开发者

Is it possible to have multiple iOs versions on mac?

开发者 https://www.devze.com 2023-01-31 10:26 出处:网络
I recently updated my Xcode to Xcode 3.2.5 and iOs 4.2. Can I hold older versions of iOS (like 4.1, 4.1 and 3.2) in a w开发者_StackOverflow社区ay that I will be able to set the \"Base SDK\"?Yes, you

I recently updated my Xcode to Xcode 3.2.5 and iOs 4.2.

Can I hold older versions of iOS (like 4.1, 4.1 and 3.2) in a w开发者_StackOverflow社区ay that I will be able to set the "Base SDK"?


Yes, you can! (Advance warning: doing this may not be safe or smart.)

Using 3.2 as an example: If you have the old SDK still handy, or can get it again, just drop the "iPhoneOS3.2.sdk" folder under: Developer\Platforms\iPhoneOS.platform\Developer\SDKs\

Rerun Xcode and you should just be able to set the BaseSDK to 3.2 like you used to.

I had to reinstall Xcode 3.2.3 to another directory to get the 3.2 SDK back, since Apple seems to delete it when you install 3.2.5. (If you reinstall 3.2.3, make sure to do a minimal install for just the SDK.)

I just did this a couple days ago and everything seems to be behaving as expected. The only reason I went through this debacle was to deploy my 3.2 app as a 3.2 app onto my 4.2 device. (Xcode really didn't want me to do that with 4.2 as the Base SDK.... but maybe there is another way around it?)

Anyway, as Tommy said, you really should use the latest SDK. I went this roundabout route as a temporary thing, and will be converting it to a 4.2 app here shortly.


Per the latest Apple advice, you should always use the latest stable version of the OS as the base SDK. If you want to allow deployment to older devices, set the deployment target (which is a separate option, down at the bottom of the 'Deployment' group in your target info) to a different value from the base SDK.

The reasoning behind this is that newer SDKs often contain bug fixes or other improvements to areas such as the build chain, which are of benefit no matter which version of the OS you are deploying to. They're also still switching some areas from informal to formal protocols, so building against the latest SDK buys you additional compile time checks.

Anecdotal evidence suggests that Apple will currently accept deployment targets as low as iOS 3.1. As of Xcode 3.2.5 you can finally just set the Base SDK to 'Latest iOS' rather than manually incrementing it every time a new SDK comes out, and I highly recommend you do so.


Another insight, if you just want to test IOS in a lower XCODE simulator version (that was my point going on this Q/A) : Just go to the simulator, and at the end of simulator /IOS menu, just go to more simulator and install the older one

Is it possible to have multiple iOs versions on mac?

I did this on xcode 4.5 release which run IOS 6, to be able to run IOS 5.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号