The short answer
Short answer: a KMP iOS app is built by an ordinary Xcode project, so signing and uploading are done with Xcode on a Mac, and the flow is the same as for a native app. The shared module adds only three extra items: signing of the embedded framework, the privacy manifest, and crash symbol files.
Which steps require macOS
What must be on macOS
- Archiving and signing. The framework compiled from the shared module has to be embedded in the app bundle and signed along with the app. This is handled by the
embedAndSignAppleFrameworkForXcodetask in Xcode's build phases, which only makes sense inside Xcode's build environment. - Uploading with Xcode's Organizer.
What you can do first in a browser on Windows
- Create the app record in App Store Connect, keeping the Bundle ID the same as
BUNDLE_IDiniosApp/Configuration/Config.xcconfig. - Create an App Store Connect API key and invite TestFlight testers.
One route that does not necessarily need your own Mac
JetBrains' docs describe setting up a TeamCity Cloud pipeline from the IDE that builds automatically and publishes to TestFlight, with the macOS build machines provided by them. It needs an API key (the .p8 file, Issuer ID and Key ID), the Team ID, the Bundle ID, and the .p12 and password of an Apple Distribution certificate. The docs also mention that the .p12 can either be exported from a Mac's keychain, or obtained on Windows or Linux by generating the certificate request with OpenSSL and converting the result. For details, follow the JetBrains docs. We have not verified its costs or limits.
How to do it on a remote Mac
Set the team in Xcode
Following the steps in the Kotlin docs: select iosApp in the project navigator, select iosApp under Targets, switch to Signing & Capabilities, and choose your team in the Team list. If you have not signed in to an account yet, use Add an Account in the list. Then confirm the Bundle Identifier is unique and the signing certificate was assigned successfully. The two-factor verification code for sign-in goes to your own devices.
Confirm the framework is signed along with the app
Projects using direct integration do not need a separate certificate configured for the framework: the Gradle task in the Run Script handles the embedded framework according to Xcode's current signing settings. What to check is that this script phase still exists and still comes before Compile Sources. When archiving fails with a framework signing problem, start looking here.
Add the privacy manifest
The Kotlin docs carry a specific reminder on the publishing page: under Apple's policy, a missing or incomplete privacy manifest can lead to warnings or even rejection. The Kotlin runtime itself may touch APIs that require a declared reason. For how to handle this in KMP apps, see the official Privacy manifest for iOS apps and follow that document.
Archive with the Release configuration and keep the dSYM
Per the docs, the Release framework of a shared Kotlin module comes with a
.dSYMfile by default, and in wizard-generated projects Xcode finds it automatically. Keep the symbols when uploading. Only then can stack traces from Kotlin code in TestFlight and App Store crash reports be resolved back to function names and line numbers.Choose the distribution method in the Organizer
After archiving, click Distribute App in the Organizer. Per Apple's distribution docs, the two commonly used options are:
- TestFlight & App Store: distribute through TestFlight, with the option to submit to the App Store.
- TestFlight Internal Only: for the team only, which prevents an in-development build from being submitted by mistake.
If there is no app record yet before the first upload, Xcode asks for additional information to create one. Option names may change between Xcode versions.
Wait for processing, then install and verify
Once the build is processed it appears in TestFlight. Install it on your own phone. Every later upload needs a higher build number.
FAQ
After upload, the Kotlin part of crash reports is all memory addresses
That means the matching dSYM was not uploaded with the build, or the framework used was not the Release one. Go back to the archive step and check the symbol files. The Kotlin docs say Release binaries on Apple platforms generate a dSYM by default. Projects with customized build configurations should confirm it has not been turned off.
Where do I change the version number on the iOS side?
The app name and Bundle ID can be changed in Config.xcconfig. For other settings, the Kotlin docs say to change them in Xcode, and the version number and build number fall into that group.
Is it safe to leave the certificate's private key on a rented machine?
During the rental term the whole machine is dedicated to you. The risk is mainly at the end of the rental: once the machine is reclaimed the keychain is not kept, so before then export the certificate and private key as a .p12, keep it yourself, and sign out of your Apple Account. If you do not export it, next time your only option is to revoke the old certificate and generate a new one.
Are the upload steps any different from a native iOS project?
No. The general order from archive to TestFlight is in steps to sign and upload on a remote Mac. This page only adds what is extra for KMP.
Related
- How do I build a Kotlin Multiplatform (or Compose Multiplatform) iOS app without a Mac?
- How do I debug a Kotlin Multiplatform iOS app on a simulator or device without a Mac?
- How do I sign an iOS app and upload it to the App Store from a remote Mac?
- Can I sign in with my own Apple Developer account on a rented Mac?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support