iOS SDK broken ever after reinstall UIKit and Foundation frameworks not found

后端 未结 6 811
时光取名叫无心
时光取名叫无心 2020-12-06 21:12

For the pch file I get these errors:

/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:6:34: error: Foundation/Found

相关标签:
6条回答
  • 2020-12-06 21:41

    I'd like to add to the Matthew's answer:

    Actually, the Framework Search Paths shouldn't be empty, but it should include only the paths to the SDK's Frameworks folders. In my case simulator worked with this path:

    /Applications/Xcode.app/Contents/Developer/Platforms/_**iPhoneSimulator.platform**_/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/
    

    and device started working when I added this one:

    /Applications/Xcode.app/Contents/Developer/Platforms/_**iPhoneOS.platform**_/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/
    

    Thi is for XCode Version 4.5.1 (4G1004).

    0 讨论(0)
  • 2020-12-06 21:43

    Check to make sure it's not a typo. Have had multiple dependencies misspell UIKit with a capital I like this:

    #import <UIKit/UIKIt.h> // typo
    #import <UIKit/UIKit.h> // correct
    

    Just check the import carefully and make sure.

    0 讨论(0)
  • 2020-12-06 21:43

    got this problem with xcode 5 (developer preview). i tried everything, including these answers - Availability.h, UIKit.h, etc not found but nothing works.

    my fix was reinstalling xcode (downloading again from developer portal and replace the old one)

    0 讨论(0)
  • 2020-12-06 21:48

    This happened for me in xcode 4, it would build fine for debug but not release. Similar to your fix, the prefix header for release was pointing to UIKit.h instead of my .pch file.

    0 讨论(0)
  • 2020-12-06 21:50

    On the Apple developer forums I managed to get help on pin-pointing the issue. It turns out somehow a build option was set to something odd.

    It was the "Framework Search Paths" option. Make sure this is empty if anyone has a similar problem.

    0 讨论(0)
  • 2020-12-06 21:55

    This happened to me. I am not very good with the Mac's "Finder." It doesn't work quite the same as Windows Explorer. I was wanting to add a couple of image files to my project, and navigating my way to the folder I accidentally double-clicked on the Developer folder, which added over 8,500 files to my project. Thinking it would be sufficient to just remove the folder from my project, I didn't know that it would change search paths. It did, and in fact, it also change my Library search path. Deleted both, and I'm good again. But not before a great deal of emotional agony.

    I add this only to let people know how the problem cropped up for me. Something like that is insidiously easy.

    0 讨论(0)
提交回复
热议问题