IOS – How exactly does an App Store developer add support for earlier versions of iOS

iosios-appstore

I just recently published my first iOS app to the App Store, but I want it to support devices with older iOS versions, and would like to confirm how to add that support before I do something that might mess things up.

On testing downloading from the App Store, I discovered that having left the iOS Deployment Target setting to the latest iOS version (currently 13.2), seems to mean that only users with the latest version of iOS on their devices are allowed to actually download the app.

  • I have a version 1.0.1 targeting iOS 13.2 on the store.

I think what I need to do is:

  1. Build another archive targeting iOS 12.0 with a higher version number (required to upload after the previous one) and post it to the store.

  2. And if I also want to support iOS 11.0, add another archive built for that with a higher version number, and upload that too.

  3. Then make sure they're all listed as available under App Store Connect -> my app -> Pricing and Availability -> Last-Compatible Version Settings.

Is that all I have to do? Is it going to mess something up that the older iOS targets will have higher version numbers of my App?

Best Answer

It doesn't mess something up that you have newer version numbers that support older iOS targets than older version numbers. That's perfectly alright.

Remember that the Deployment Target is the minimum version of iOS that user's need to have.

The optimal way to do what you want is to set the deployment target to iOS 11, and then in your app conditionally use features for iOS 12 and iOS 13 depending on their availability.

This means that you can compile one single archive that contains a single app that will install on iOS 11, iOS 12 and iOS 13, and will offer different functionality depending on the iOS version on the user's device.

If you're using Swift for example, it could look something like this:

if #available(iOS 13, *) {
  // new stuff
} else {
  // old stuff
}