mozzer
mozzer

Reputation: 241

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.

Upvotes: 3

Views: 3375

Answers (3)

Luca Bernardi
Luca Bernardi

Reputation: 4199

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.

Upvotes: 0

Jasarien
Jasarien

Reputation: 58448

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.

Upvotes: 1

Björn Marschollek
Björn Marschollek

Reputation: 9999

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.

Upvotes: 6

Related Questions