Louis Shraga
Louis Shraga

Reputation: 803

IOS SDK backward compatibility

I am using XCode 4.5 I only have IPhoneSDK6.0 installed. Was searching the whole network but can not find IPhoneSDK5.0 to download

Does that mean that I can use SDK 6.0 and the fact that I am setting Deployment Target to 5.0 will make sure I am not allowed to use any of the features of SDK 6.0 ?

Specifically I am now in process of changing all my usage of UICollectionView to a PSTCollectionView which gives the same functionality on older SDKs.

Since I did not find SDK 5.0 to download I assumed SDK 6.0 and Deployment Target 5.0 will make sure I fail compilation if I use UICollectionView anywhere in the code - but this does not happen

What should I do ? Download SDK 5.0 ? From where ?

Upvotes: 0

Views: 933

Answers (1)

rmaddy
rmaddy

Reputation: 318854

I'm sure this has been answered before but you don't download any other SDK. You set the Base SDK to the latest (currently 6.0) and set the Deployment Target to the earliest you wish to support (but no further back than 4.3).

Since this means your app can be used on devices with different versions of iOS, you must code properly. If you use an API that is new to iOS 6.0 then you must write the code so it is only executed on a device with iOS 6.0 or later.

See the docs for the "SDK Compatibility Guide" for the proper way to do this.

Xcode gives you no help to ensure you are doing this properly. You must run your app on devices with all the different versions of iOS you wish to support. You can also use the simulators. The Downloads preferences page in Xcode lets you install simulators back to iOS 4.3.

Upvotes: 1

Related Questions