Introduction
Xcode is IDE for iOS Development developed by apple. It has two language one is Objective-C and other one is Swift. Xcode developer mostly hit by this problem that is “Linker command failed with exit code 1 after installing CocoaPods” it can be occur due to many reasons we will discuss about some of these issues and hope that you will find a way to solve your issue.
Linker Command failed Error Solution 1
Contents
If you are using Cocoapods in your project, one needs to use xcworkspace to build instead of xcproject. If you are using Cocoapods and build from xcproject , it will ignore the Cocoapods libraries you need. so first check that Close your current project and open the .xcworkspace created in your project folder.
If you didn’t success with above method then go to PROJECT Settings.
then go to BUILD SETTINGS.
Change BUILD ACTIVE ARCHITECTURE ONLY to NO.
after this change then build your project again. Good Luck!!!
Linker Command failed Error Solution 2
Checkwhether you have named two files as same text like myareacode.h and myareacode.h files. Having same name file in one project causes this issue it is very easy to find which file is duplicate name in error logs that are shown when you try to run your project and you hit by this linker command failer error than there you also can check error logs. From error logs you can see which file is duplicate or there will be detailed cause of occur of this issue.
Linker Command failed Error Solution 3
Calling same header files in one file also can cause this issue. But for this you have to check each and every file and in file you have to check every single #import line code that nowhere its duplicate or written twice or more.
Linker Command failed Error Solution 4
Sometimes we declare static or global variable that can be used in anywhere project but we do not maintain that name of variable should not be repeated. And if it is repeated than it also causes error and hard to catch such error.