Linker Command failed with exit code 1 (use -v to see invocation), Xcode 8, Swift 3

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 folder in Finder->right-click, move to trash), cleaning the project(CMD+Shift+K or Product->Clean), updating carthage and dependencies, checked other answers on StackOverflow (mostly adjustments in Build Settings/Phases), and recloned the app from github, etc.

The same project works on my collaborators computers..

EDIT: From the current top-rated answer, I was able to debug a little further...I am still not sure how to fix though. It looks like I have something in the project twice? I looked and can't find anything showing up twice!

Here's a picture of the log:


i was facing same issue today in xcode 8 version 8.3.2

right click on issue --> reveal in log

enter image description here

then you are able to check what is causing that issue

enter image description here


Maybe you installed a pod file and you are still trying to build from the .xcodeproj file instead of .xcworkspace


the only thing that worked for me was to run pod deintegrate and pod install


did you try a clean? cmd + shift + k


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!