I'm getting the following error after upgrading Xcode to 4.6 and building my Kobold2D project:
ld: file not found: /Users/Jon/Library/Developer/Xcode/DerivedData/Kobold2D-
awxpgwvfoipnxpdyaptbdirnnfwq/Build/Intermediates/ArchiveIntermediates/Kodable-
iOS/BuildProductsPath/Release-iphoneos/libkobold2d-ios.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It happens only when building the IPA with product>archive. I can run directly on the device no problem. This leads me to believe its a distribution permissions setting. I've done some research on the error here, and also reviewed similar questions on SO. I have an idea of what the problem is, but none of the solutions seem to fix the issue.
This only just happened with Xcode 4.6. I've been able to build IPAs before no problem, and even have the app in the App Store, so I don't know what changed to cause this.
I figured this out today, so I will answer it for anyone else that might have this problem.
Somehow the libkobold2d-ios.a
file (along with a few others) were removed from the "link binary with libraries" section of build phases. I definitely didn't do that manually, so I don't know why they were missing, but when I added them back it worked.
A quick note - They will still show up as red, because they have to be built at compile time.