When I archive an iPhone project, it returns a failure:
Could not build module "Foundation".
However, when I debug on the iPhone, it runs successfully.
I tried to set ‘Enable Modules’ to No and it seems normal, but another 3rd party library I'm using requires modules be turned on.
What do I do in that case? How do I import social now?
Set to YES target's Allow Non-modular Includes in Framework Modules in Build Settings.
Only reinstalling Xcode worked for me.
This happened to me after trying to build a third party library. It made a symbolic link in the iPhoneOS.sdk/usr/include to a non-existent header file in iPhoneSimulator.sdk/usr/include.
After deleting the bad symbolic link, Xcode started building correctly again.