简体   繁体   中英

How to support different iOS SDKs on Xcode 4.2?

After installing Xcode 4.2 there is only iOS 5.0 SDK in Xcode. Also I should support iPhone 3G with iOS 4.2.1. How support two or more SDKs for one App with one Xcode? I tried install Xcode 3 with iOS SDK 4.3 but Xcode crashes when starting.

Set the deployment target of the App to iOS 4.2.1, this will allow all iOS devices running 4.2.1 or upwards to run your App, however, you won't get any compiler warnings if you use stuff from eg. 5.0, so double check your code and add branches if needed. Another thing is that since Xcode 4.2, the compiler only generates armv7 code, but since you also want support for the iPhone 3G, you have to manually tell it to also generate armv6 code by selecting your target, switching to the Build Settings Tab and there adding armv6 to the Architectures list.

Latest SDK included all required features from previous SDK versions. You shouldn't worry about it. If you want to support iPhone 3G just set iOS Deployment Target to iOS 4.2 (or another would you like) in project settings at Build Settings tab.

Don't remember to test your application on that iOS version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM