Publish to the App Store from Windows: Build and Upload .ipa
Build Release with a Distribution certificate to get an .ipa, upload it to App Store Connect with kxstore (or Transporter on a Mac), then go through TestFlight and App Review. Ad Hoc and enterprise distribution work the same way.
Last updated
To publish to the App Store from Windows, there are three stages. Build Release with --export app-store and KXBuild signs it with your Apple Distribution certificate and writes an upload-ready .ipa. Upload it to App Store Connect with kxstore, the command line that ships with KXBuild and runs on Windows, Linux and macOS. Then finish TestFlight testing and App Review on the website. It all happens on your own computer, with no cloud Mac to rent.
Before you start, your keychain folder needs an Apple Distribution certificate and an App Store provisioning profile. If you don't have them yet, see how to sign iOS apps on Windows.
How do I publish an .ipa to the App Store from Windows?
1. Bump the version
App Store Connect requires each upload's build number, CFBundleVersion, to be higher than the last one. The version number, CFBundleShortVersionString, is what the store shows. Change them on the General page of the Project Settings Editor, or edit Info.plist directly. If Info.plist refers to CURRENT_PROJECT_VERSION, you can also pass -D CURRENT_PROJECT_VERSION=<new number> on the command line.
2. Build Release
In VS Code, run KXBuild: Build for App Store (.ipa) from the Command Palette or the project's context menu. On the command line, run
> kxbuild build .\MyApp.xcodeproj -c Release --export app-store--export app-store signs with the Apple Distribution certificate and App Store provisioning profile in the keychain folder, whatever signing the project itself is set to. The build writes build\MyApp.ipa in the project folder, with the same layout as an Xcode export.
3. Upload
Upload with kxstore, the App Store Connect command line that ships with KXBuild. It is already installed once you have run kxbuild doctor, and it runs on Windows, Linux and macOS. Sign in once before the first upload: in App Store Connect, open Users and Access → Integrations → Team Keys, generate an API key, download it and run kxstore login --api-key-file AuthKey_ABC123.json. From then on there is no Apple ID password or two-factor code to type, so scripts, CI and AI agents can run it unattended.
> kxstore build upload build\MyApp.ipaAdd --wait to return only after Apple has finished processing the build. Create the app record in App Store Connect first, on the website, with the same bundle ID as the package. On a Mac you can also drag the .ipa into Transporter instead.
4. TestFlight and App Review
Apple takes anywhere from a few minutes to an hour or so to process the upload. The build then appears on the TestFlight tab in App Store Connect, where you can send it to internal testers first. When you're happy with it, select the build on the App Store tab, fill in the details and submit it for review.
5. The whole release as one command (optional)
Everything from the upload to the review submission can also run as the single command kxstore release: it uploads the .ipa, fills in the metadata, uploads screenshots, waits for Apple to process the build and submits it for review. If it fails partway, run it again and it picks up where it stopped. Run it with --dry-run first to see what it will do, then run it for real. See the kxstore command reference for every command.
How do I distribute with Ad Hoc or enterprise profiles instead?
The steps are the same, with an Ad Hoc profile or an enterprise account's In-House profile instead. Ad Hoc profiles must include the device UDIDs. You can install the .ipa over a cable on any iPhone listed in the profile.
> kxdevice install MyApp.ipaWhat should I check before uploading to the App Store?
- The provisioning profile is an App Store profile. A package signed with a Development or Ad Hoc profile uploads fine, but won't install from TestFlight or gets rejected in review.
- The app icon is complete. Open the .xcassets in VS Code and run KXBuild: Compile-check Asset Catalog to list missing sizes.
- The build number is higher than last time, and the bundle ID matches the App Store Connect record.
Checking these three items first saves you a TestFlight build that won't install or a rejected review. For every new version after that, bump the build number, build for the App Store again and upload; that's the whole loop to publish to the App Store from Windows.
Next steps
kxstore command reference
Every kxstore subcommand and option: sign in with an App Store Connect API key, register bundle ids, issue certificates and profiles, upload the .ipa, import metadata and screenshots, submit for review, TestFlight, in-app purchases and pricing — or run the whole release with one command from a script, CI or an AI agent.
Build and configure
Debug versus Release, choosing a scheme, target and configuration, overriding build settings, where build products go, when you get an .ipa and when Swift package dependencies resolve.