I can\'t get rid of this error!
I have tried all sorts of things like clearing Derived Data(Preferences->Locations->click gray arrow to open Derived Data fo
I had same problem.
The cause was that I declared same global variable in 2 files. So it was showing same error saying 2 duplicate symbols.
The solution was to remove those variables.
In my case the reason of the error is library which was linked two times.
I use react-native
so it was linked automatically using react-native link
and manually in xcode.
For any one having this issue with Flurry framework. This is what fixed my issue. For me the issue was that i had imported the following files but never used them. "libFlurryTVOS_9.2.3" "libFlurryWatch_9.2.3"
So all I had to do was go to project target settings and remove these 2 files from the "Linked framework and libraries" section and the problem was solved.
Here is my problem and solution:
I removed two files from the source code using source tree(Version controller). After applying the diff, that contains the two classes I removed, Xcode didn't add it automatically. So I got linker error.
I manually added the files, by right click on group name and select "Add files to ". Now my error got resolved.
If anyone faced the linker error regarding class file, then try to add it manually.
Okay...So here is what solved my problem...
in App Delegate File:
#import "AppDelegate.h"
#import "DarkSkyAPI.h"
//#import "Credentials.h"
I had imported Credentials.h already in the DarkSkyAPI.m file in my project. Commenting out the extra import made the error go away!
Some things to mention and maybe help anyone in the future. @umairqureshi_6's answer did help me along the process, but did not solve it. He led to where I was able to dig out the info. I kept seeing AppDelegate and DarkSkyAPI files showing up in the error log and the information it was pulling from Credentials file was causing the error. I knew it had to be in one of these 3 files, so I immediately checked imports, because I remembered hearing that the .h carries all the imports from its .m file. Boom!
I had the same problem using Carthage for dependencies.
Just go to Select Project -> Build Settings -> Search for Enable Bitcode -> If it is selected to Yes, select No.
That solved this problem for me.