Reputation: 181
By April 2023, Apple has mandate us to use Xcode 14.1 with iOS 16.1 SDK when building and submitting app.
In Xcode there're 2 fields:
"iOS Deployment Target": iOS 16.1 ("Default" means 16.1? in xcode 14.1?)
"Minimum Deployments": what is the minimum iOS version we can set is it 11.0? or 10.3 or 9.0?
Update:
According to this, does this mean we must use iOS 16.1 as our "iOS Deployment Target" and 11.0 for "Minimum Deployments" in Xcode 14.1:
Upvotes: 8
Views: 23670
Reputation: 3454
This is your first screenshot.
When you have selected the project in the left tab area, then in the main tab panel area you can see Deployment Target for iOS (and also for macOS if you are deploying there also, etc. for the other platforms).
This deployment target is a fallback default value which appears if you delete the Minimum Deployments value when you have selected a target in the left tab area.
This is your second screenshot.
The Minimum Deployments value seen when a target is selected in the left panel controls from which version of iOS (or macOS, etc.) are allowed to install the app.
When Apple say you need to use a particular SDK, they are not talking about the deployment concept. They are talking about which version of the SDK was used to compile the app. This is known as the Base SDK. It comes with the version of Xcode you are using. If Apple cannot get developers using the latest Base SDK, they cannot push people off old deployment targets as each SDK covers only a specific range of deployment targets.
There is a subtle interaction between Xcode and App Store submission. Xcode comes with scripts and tools to upload your app to the App Store for review. The App Store, as a web service, must match the uploader being used due to the use of private APIs between them. There is a cut-over point where an old Xcode won't be able to upload to the current App Store.
Mandating a certain Xcode version means that Apple can modernise the upload workflow and clean up the bundle format and requirements over time.
Sometimes if you are stuck on a given Xcode version, you might be able to use the uploader for the latest Xcode to submit your app for App Store review.
Come the changeover in April 2023, you would compile your project with Xcode 14.1. This sorts out the Base SDK requirement. You get to pick what deployment target you want based on the table you have specified.
The "best practice" is last year's major iOS version. Test on that, the current version, and the latest Beta version.
In the real world, it comes down to your user community.
The problem for Apple is if your app won't run on their new hardware and this may be a consequence of too old deployment target. For example September 2018 guidance mandated that the app would run on iPhone XS Max.
Setting (forcing) the deployment target to be too old usually results in compile time errors.
I haven't heard of the deployment target of itself being a reason for App Store rejection, but I would be interested if someone can share any anecdotes on that.
Specifying a deployment target too new (unreleased beta software versions) is an issue. You get rejected for that even if you don't use any of the unreleased functionality.
Upvotes: 3