Question

I've released an app for iOS6 (deployment target: 6.1, SDK 6.1) but now wish to make the app for iOS5 because I realize how many users still have iOS5 to keep the old native Google Maps. I understand I'll have to remove any iOS6-only features such as auto layout and UICollectionView which is okay by me.

My question is, in Xcode, what do I need to configure? Do I modify the deployment target and SDK to read 5.x? Will the Apple Review Board reject my app if I do this?

I'm trying to avoid doing "if device is iOS6 then, else if device is iOS5 then" because it sounds messy when trying to build so I've decided to just make the entire app 100% iOS5 to keep things simpler.

Was it helpful?

Solution

If your application has the same audience as ours then you should expect about 35% or so of people still to use iOS 5. That's not merely because of obstinate feelings about mapping but also because iOS 6 hasn't been made available for the original iPad and because a lot of people simply don't upgrade when everything's already working well.

To allow your application to run under iOS 5, just change the deployment target. When developing for iOS you always link against the latest SDK because:

  • there's no technical advantage to being built against an older SDK —
    • Objective-C calls are fully dynamic so the OS can figure out how to route them regardless;
    • the vanilla C structs like CGRect, CGPoint, NSRange, etc, have never varied in size;
    • all C APIs are designed around passing references like CGImageRef, so even if the thing underneath changes completely the correct way for compiled code to handle a reference remains identical; and
  • Apple tests the latest compiler toolchain against the latest SDK only and you'll want to take advantage of all the latest compiler optimisations and bug fixes.

Supposing you were to want to take advantage of an iOS 6-only feature you wouldn't test the version of the OS, you'd test whether the feature were available. Usually that involves calling respondsToSelector: or testing whether [<feature> class] is non-nil.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top