Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 6 APIs and backwards compatibility

Can I use APIs and Frameworks introduced in iOS 6 in an app that supports earlier iOS versions?

Is this only possible through workarounds and code such as:

[[UIDevice currentDevice] systemVersion]

Or would I be able to use updated frameworks, APIs, etc. in an app that supports earlier versions of iOS without specifying the version?

And also, would I be able to use Xcode 4.5, or would I have to stick to the current public release?

like image 302
Sam Spencer Avatar asked Jun 11 '12 19:06

Sam Spencer


1 Answers

You can't ship an app that uses iOS 6 features at all until the OS and toolchain go final. (Update: The iOS 6 OS and SDK are now final.)

At that point, you should use the iOS 6 SDK and set your deployment target to an earlier version of iOS 5. You will not check the system version, but rather weak link the new frameworks, and test for the presence of specific classes or methods before using them, etc.

One extra wrinkle is that with the iOS 6 tools and SDK you can no longer support armv6 devices. You can support the iPhone 3GS and later, as well as every model of the iPad, but not the iPhone 3G and the original iPhone. But even with a legacy app, you shouldn't be targeting these anymore.

References:

  • SDK Compatibility Guide: "Read this document if you want your application to target a specific version or multiple versions of iOS or Mac OS X."
like image 68
Steven Fisher Avatar answered Sep 28 '22 14:09

Steven Fisher