Xcode 9 - linker command failed with exit code 1
While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
ios xcode
add a comment |
While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
ios xcode
add a comment |
While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
ios xcode
While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
ios xcode
ios xcode
asked Oct 3 '17 at 8:37
sunilkumarsunilkumar
57117
57117
add a comment |
add a comment |
8 Answers
8
active
oldest
votes
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
1
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
add a comment |
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device
while building or set the Build for Active Architecture only
as true in Build Settings
.
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
1
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local.podspecs
I get this issue.
– ScottyBlades
Oct 8 '18 at 17:17
add a comment |
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
add a comment |
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
add a comment |
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
- Read the error report to identify the repo that supposedly contains duplicate files.
- Drag repo to the trash.
- re-clone your repo.
- set up your repo with correct remote tracking.
git remote add <url.git>
, orgit remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop
for a local dependency, git
would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop
was no longer pulling from multiple commits at once. Perhaps there was a weird git
cache for my repo.
add a comment |
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
add a comment |
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
add a comment |
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46540423%2fxcode-9-linker-command-failed-with-exit-code-1%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
1
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
add a comment |
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
1
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
add a comment |
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
answered Sep 25 '18 at 10:13
Krishna kushwahaKrishna kushwaha
18919
18919
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
1
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
add a comment |
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
1
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
How to use the xcworkspace to build can you explain in detail?
– Marfin. F
Oct 9 '18 at 1:51
1
1
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
just closed xcode than go through your project folder u will get there (yourproject.xcworkspace ) . whenever you add or update library than u need to close xcode . after finished your updates u can open .xcworkspace file
– Krishna kushwaha
Oct 10 '18 at 4:31
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@Krishnakushwaha my project folder there is no any .xcworkspace file
– Akila Devinda
Oct 13 '18 at 20:24
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
@AkilaDevinda ok no problem just go through your project directory and install pod using terminal cmd - pod install after that you will get .xcworkspace
– Krishna kushwaha
Oct 15 '18 at 4:33
add a comment |
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device
while building or set the Build for Active Architecture only
as true in Build Settings
.
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
1
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local.podspecs
I get this issue.
– ScottyBlades
Oct 8 '18 at 17:17
add a comment |
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device
while building or set the Build for Active Architecture only
as true in Build Settings
.
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
1
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local.podspecs
I get this issue.
– ScottyBlades
Oct 8 '18 at 17:17
add a comment |
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device
while building or set the Build for Active Architecture only
as true in Build Settings
.
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device
while building or set the Build for Active Architecture only
as true in Build Settings
.
answered Oct 3 '17 at 8:44
Abhishek JainAbhishek Jain
497517
497517
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
1
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local.podspecs
I get this issue.
– ScottyBlades
Oct 8 '18 at 17:17
add a comment |
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
1
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local.podspecs
I get this issue.
– ScottyBlades
Oct 8 '18 at 17:17
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
Didn't work for me. I think there actually is a problem..
– ScottyBlades
Oct 5 '18 at 21:10
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
@ScottyBlades Can you brief the problem?
– Abhishek Jain
Oct 8 '18 at 6:45
1
1
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local
.podspecs
I get this issue.– ScottyBlades
Oct 8 '18 at 17:17
My company is going through a migration from swift 4 to 4.2 and some of our internal modules have made the switch while others have not. When I try to use local
.podspecs
I get this issue.– ScottyBlades
Oct 8 '18 at 17:17
add a comment |
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
add a comment |
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
add a comment |
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
answered Oct 28 '18 at 20:25
Ahmed SamirAhmed Samir
992
992
add a comment |
add a comment |
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
add a comment |
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
add a comment |
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
answered Nov 6 '18 at 20:58
Alex DelgadoAlex Delgado
720818
720818
add a comment |
add a comment |
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
- Read the error report to identify the repo that supposedly contains duplicate files.
- Drag repo to the trash.
- re-clone your repo.
- set up your repo with correct remote tracking.
git remote add <url.git>
, orgit remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop
for a local dependency, git
would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop
was no longer pulling from multiple commits at once. Perhaps there was a weird git
cache for my repo.
add a comment |
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
- Read the error report to identify the repo that supposedly contains duplicate files.
- Drag repo to the trash.
- re-clone your repo.
- set up your repo with correct remote tracking.
git remote add <url.git>
, orgit remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop
for a local dependency, git
would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop
was no longer pulling from multiple commits at once. Perhaps there was a weird git
cache for my repo.
add a comment |
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
- Read the error report to identify the repo that supposedly contains duplicate files.
- Drag repo to the trash.
- re-clone your repo.
- set up your repo with correct remote tracking.
git remote add <url.git>
, orgit remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop
for a local dependency, git
would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop
was no longer pulling from multiple commits at once. Perhaps there was a weird git
cache for my repo.
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
- Read the error report to identify the repo that supposedly contains duplicate files.
- Drag repo to the trash.
- re-clone your repo.
- set up your repo with correct remote tracking.
git remote add <url.git>
, orgit remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop
for a local dependency, git
would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop
was no longer pulling from multiple commits at once. Perhaps there was a weird git
cache for my repo.
edited Nov 20 '18 at 21:43
answered Oct 9 '18 at 0:03
ScottyBladesScottyBlades
1,7121525
1,7121525
add a comment |
add a comment |
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
add a comment |
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
add a comment |
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
answered Nov 21 '18 at 17:39
Ankit gargAnkit garg
1,2111214
1,2111214
add a comment |
add a comment |
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
add a comment |
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
add a comment |
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
answered Nov 24 '18 at 11:02
user6545780
add a comment |
add a comment |
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.
add a comment |
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.
add a comment |
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.
answered Nov 29 '18 at 23:26
KeithTheBipedKeithTheBiped
279212
279212
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46540423%2fxcode-9-linker-command-failed-with-exit-code-1%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown