0

basically it happens at the line like #import and every other ios header, like UIAccelerometer is unavailable and even UIView is unavailable, the compile stopped at the line #import. what could cause that?

4

3 回答 3

2

I just had this issue trying to build for iOS 5.1 in XCode 4.5 after manually installing the iOS 5.1 SDK out of XCode 4.4.

After some initial frustration, this solved the issue: Xcode 4.5 and iOS 4.2.1 incompatibility

Find your .xcodeproj, do "Show Package Contents" to expose your .pbproj and open it in a plaintext editor ( or Komodo Edit, maybe TextEdit if you have it setup to use plain text by default). Find every instance "IPHONEOS_DEPLOYMENT_TARGET" and make sure it says "IPHONEOS_DEPLOYMENT_TARGET = 4.0;"

Having the SDK 5.1 installed alone isn't enough, as I have discovered. Nor is changing the Deployment Target field under "Info". I had to manually edit the .pbxproj

于 2012-12-15T07:30:28.463 回答
0

Either you are building for MacOSX by accident, or you need to add the frameworks you are importing form iOS into your project.

于 2012-08-23T17:15:48.430 回答
0

faced similar compiling issues with xcode 5 using base sdk 6.3 - turned out to be several xib had a value of "opens in Default(5.0)". Setting the value to "opens in XCode 4.6" fixed itenter image description here

于 2013-10-15T21:04:26.570 回答