简体   繁体   中英

iOS deployment target set to iOS 4.2. Will the app run on devices running earlier versions of iOS?

If an app is compiled in Xcode with its iOS Deployment target set to iOS 4.2, will it run on devices running earlier versions of iOS? The app does not have features exclusive to iOS 4. I did a clean install of Snow Leopard and XCode 3.2.5, and earlier versions of the SDK aren't there to test against.

No. The deployment target defines the minimum required verision of iOS the device must be running. You can set the build target so 3.1.3, for example, to support devices with iOS versions >= 3.1.3. The Base SDK setting defines which SDK version your app is using. This will be 4.2. As long as you do not use any iOS 4 features, you can safely set the deployment target to 3.1.3.

No. The app will only run on the version set in the Deployment target and later versions, not earlier.

The deployment target needs to be set to the lowest version of iOS that you wish to support, eg. iOS 3.x.

I know you've stated it doesn't use any 4.x specific features. but just for completeness:

If you set your deployment target to a version older than the latest, you need to weak link new frameworks and test for the existence of classes/constants symbols before using them and fail-over if they don't exist.

No. It doesn't run. iOS can't know if your app will using features not available untill he launch it so you have to set this as a requirement.

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