1

I am unclear on how to tell if a new feature of iOS 5 requires iOS version 5 running on the device or if the feature can be obtained simply by compiling with the iOS 5 SDK.

ARC is an example. I understand if it supported under the iOS 5 SDK on devices that have not upgraded to iOS 5. Where is the documentation that tells me what SDK features require iOS 5 on the device?

Peter Majeed
  • 5,304
  • 2
  • 32
  • 57
Draco
  • 1,003
  • 1
  • 10
  • 14

2 Answers2

1

Generally you can build application using iOS SDK 5, which will be working on older iOS.

The build settings of every project have two different parameters, which define base SDK and iOS Deployment Target. This first defines which SDK do you use to build your app. Second is the minimum iOS version which is required for your application.

When you build this application, you should pay attention to not use any function / object which are newer then your deployment target, because compilator and linker can allow to use it, and application will crash on devices.

Of course Apple Docs always contains information about minimum iOS version, which is required by an object. Every new version always contains change log, containing changes from previous version.

Examples:
Description of iOS 5 SDK
iOS 5 Release Notes

Tomasz Wojtkowiak
  • 4,910
  • 1
  • 28
  • 35
1

You should always use the newest SDK as base SDK in your application. You can always target older iOS version with the "Deployment Target" setting, but you have to pay attention which new features you can use.

For example, iOS 5 brings two interesting new features, namely ARC and storyboards. You can use ARC if your deployment target is iOS >= 4.0, with the exception of weak references, which unfortunately do not work with iOS4. Storyboards are different, they need iOS 5, they won't work at all on older devices!

If you're using the newest XCode 4, you have to do some extra work to fully support iOS 4 or older versions. This is because the armv6 code generation has been deleted from all templates. Newer devices use the armv7 instruction set, but you can compile your application so that it targets both the armv6 and armv7 instruction set. See my other post on this topic.

Community
  • 1
  • 1
shapecatcher
  • 907
  • 6
  • 9