I know this question has been asked many times here and here and here, but I'm very frustrated that none of those answers fixes my problem!
There are 3 projects in my workspace: the app, a "custom" framework, and (Cocoa) Pods. When I run the app on a simulator or device, it works fine. When I try to archive, it fails with "ld: framework not found ".
I've tried:
- Removing and adding the framework from the app's General settings
- Many combinations of "(inherited)" and "(PROJECT_DIR)" in the app's Build Settings
- Quitting and restarting Xcode
- Deleting everything in DerivedData
Note I always run and archive from the workspace.
What's interesting is that the app runs fine whether the Run build configuration is set to "Debug" or "Release" and it gives the error whether the Archive build configuration is set to "Debug" or "Release", so I don't think it's the Build Settings. What is different about archiving?
I think this is a good clue: the Build / Products folder inside DerivedData only contains a "Debug-iphonesimulator" folder with the .framework package. Shouldn't it also contain release folder of some kind?
Any ideas or other things to try?