Xcode6 'Foundation/Foundation.h' file not found

本小妞迷上赌 提交于 2019-12-10 12:31:07

问题


Using Xcode6-Beta, I'm unable to compile code to run on the my iOS7.1 device. I get errors like this:

While building module 'UIKit' imported from /Users/johnboiles/Programming/iOS/Playground-ios/Playground-ios/AppDelegate.h:9: fatal error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>
        ^
In file included from /Users/johnboiles/Programming/iOS/Playground-ios/Playground-ios/AppDelegate.m:9:
/Users/johnboiles/Programming/iOS/Playground-ios/Playground-ios/AppDelegate.h:9:9: fatal error: could not build module 'UIKit'
#import <UIKit/UIKit.h>
 ~~~~~~~^

Interestingly Foundation.framework is in fact NOT in /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks like it was in previous versions of Xcode. I haven't (knowinglyly at least) modified anything in the SDKs.


回答1:


Removing and reinstalling Xcode6-Beta fixed the issue.

If anyone has any insight into what happened to Foundation.framework, I'd love to hear it.




回答2:


Product->Clean did the trick for me




回答3:


I did the following steps and everything went back to normal.

  1. Reinstall the current Xcode
  2. At the Xcode's first launch, Shift + Command + K to clean the previous build
  3. Wait until the indexing done.
  4. Build again.


来源:https://stackoverflow.com/questions/24152721/xcode6-foundation-foundation-h-file-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!