Install Simulator SDK 4.3 to Xcode 4.4 on Mountain Lion

后端 未结 5 1223
夕颜
夕颜 2020-11-28 04:59

I want to install SDK 4.3 in xcode 4.4 on mountain lion (os x 10.8), but when I installed the 4.3 sdk package from xcode 4.1 and launched the simulator from xcode 4.4, the s

5条回答
  •  北海茫月
    2020-11-28 05:38

    I've had this annoying situation too. Recently, I managed to add a compile-time check for checking APIs against older versions of the SDK. Unfortunately, you can't test it with the older version through the simulator but it's still something.

    So here's what I did:

    I first had to get the older Simulator SDK I wanted to get. I could easily get this by downloading older Xcode 3 (not 4) versions which included the SDK needed. Xcode 3.2.6 with iOS SDK 4.3 is linked here.

    I next had to install the SDK. This wasn't too hard, so I won't explain much here. But the SDKs are stored in the Packages folder. This folder is clearly visible in earlier Xcode 3 versions but is hidden in later versions (like Xcode 3.2.6). You can easily open it anyway through Terminal. Remember to install the simulator SDK, not the regular one. Also, after the change in Xcode 4.3 where the Developer folder moved to within Xcode.app, I had to install the SDK into a tmp folder and move the SDK into Xcode.app myself. I would then need to restart Xcode if I had it open.

    After that, I duplicated the debug configuration in my project and named it something like iOS 4.3 API Check or something like that - doesn't really matter. Then I changed the Base SDK of this new configuration to the old SDK which I installed. The SDK I installed was not listed though so I had to select other and entered iphonesimulator4.3.

    Finally, when I needed to check against older versions of the SDK, I changed the configuration for the Run .app in my project scheme to my iOS 4.3 API Check configuration. And there we go, a compile-time check against iOS 4.3.

提交回复
热议问题