iOS Deployment Target is different from SDK version. The former is the minimum version of iOS your app supports, the latter is the SDK version your app was built with. Apple generally requires you to build apps with the latest SDK version for App Store submission, which is usually only possible with the last couple major Xcode and macOS releases.
You can't use the newer SDK with the older version of Xcode. But there are a few options to get your app on the store without upgrading to a newer Mac:
- Use OCLP to upgrade your Mac to a newer macOS that supports a later version of Xcode. Check support for your model here: https://dortania.github.io/OpenCore-Legacy-Patcher/MODELS.html
- Try to unofficially run the latest Xcode on your older macOS by opening the .app's package contents, as in this SO answer: https://stackoverflow.com/a/69995053
- Use a cloud CI service to build your app with the newer SDK version, then download the archive and sign/export/upload it using your older version of Xcode. Here's Azure Pipelines code that worked for me:
pool:
vmImage: 'macOS-13'
steps:
- task: Xcode@5
inputs:
actions: 'archive'
scheme: '<scheme>'
sdk: 'iphoneos'
configuration: '<build config>'
xcWorkspacePath: '<path to xcworkspace file>'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(HOME)/Library/Developer/Xcode/Archives/'
To solve this issue, you ONLY need to build/archive the app on the CI service with the latest SDK, you don't need to sign it or export the .ipa, which keeps the pipeline code simple and avoids the hassle of creating and uploading a signing cert and provisioning profile. Then all you have to do is download the archive artifact from the pipeline, move it to ~/Library/Developer/Xcode/Archives
on your machine, and open Xcode -> Organizer -> select archive -> "Distribute App" as you normally would, which will sign, export, and upload it to App Store Connect, and you won't receive the SDK version issue.
Option 1 is good if you want to unofficially update your macOS anyway, but if you don't, options 2 or 3 should work.