Search code examples
iosios6ios9compatibilityxcode7.2

Will iOS Application created in XCode 7.2 with SDK 9.2 be compatible with iOS 6 in iPhone 4?


If i create an iOS application in XCode 7.2 with SDK 9.2, will that application work in iOS 6 in iPhone 4?


Solution

  • In general, this is possible - that is where the availability information in the apple documentation comes into play.

    You may use iOS 6 as your deployment target and only use the API available on iOS 6.

    This will mean your code completion on the current Xcode will suggest unavailable methods and you will be very limited in terms of what the API can do for you.

    Also, to cherry pick one of the problems you might run into:

    iOS 6 has a whole different approach to authorization for location usage than iOS 9, so you would have to (partly) clutter your code with a lot of version checks to give different implementations for the different versions (and version checks were not available back then). Because, a iOS 9 device will not even ask the user for permissions if you do it the way iOS 6 documentation says you have to do it.

    The very fact that you do ask this question might already give away that in general, the answer is

    Yes, that can be done with a lot of work that is almost intractable for a single person and in almost all cases not needed.

    as the market share of iOS 6 is only a tiny fraction, but in your case, the answer might even be

    You will probably fail horribly at some point and should reconsider if this is really necessary. The market share of iOS 6 is really small and you are basically putting in weeks of extra work for basically a hand full of potential users.

    Also, as you might have guessed from this (and other answers), if your question is if this works out of the box, the answer is

    No.