Sub topic 13
Publishing through TestFlight and the App Store
This chapter covers the path from a signed iOS build to a public App Store release. It assumes you can already produce an IPA with flutter build ipa, that your app has a unique bundle identifier, and that you have an Apple Developer Program membership. It also assumes you understand the version name and build number from the versioning chapter. The Google Play counterpart is covered separately, so this chapter deals only with Apple's tools.
How the pieces fit together
App Store Connect is Apple's web portal for managing apps. TestFlight is the beta-distribution service inside it. Both use the same build record, so a build you upload for testing is the same build you later submit for review.
Step 1: Create the app record
Before the first upload, you need an app record. In App Store Connect, open Apps, choose New App, and fill in these fields:
- Platform: iOS.
- Name: the public name, which must be unique across the App Store. It can differ from the display name on the home screen.
- Primary language: the language of your default metadata.
- Bundle ID: choose the identifier you registered, such as
com.example.myapp. It must match the bundle identifier in your Xcode project exactly. It cannot be changed after the first build is uploaded. - SKU: an internal identifier for your own records. Users never see it.
If the bundle ID is missing from the dropdown, register it first under Certificates, Identifiers & Profiles in the developer portal. Xcode registers it automatically when automatic signing is on.
Step 2: Prepare the build for upload
Two settings commonly block or slow down a first upload.
Version and build number. App Store Connect rejects an upload if the build number has already been used for the same version name. Pass both on the command line so CI and local builds agree:
flutter build ipa --release \
--build-name=1.2.0 \
--build-number=8 \
--dart-define=API_BASE_URL=https://api.example.comThe result is build/ios/ipa/<app>.ipa, plus an .xcarchive under build/ios/archive. The default export method is app-store, which is what TestFlight and the store require.
Export compliance. Every upload asks whether the app uses encryption. If the only encryption you use is standard HTTPS through the operating system, you can declare this in ios/Runner/Info.plist so the question is answered automatically:
<key>ITSAppUsesNonExemptEncryption</key>
<false/>Set it to true only if you ship your own or non-standard cryptography. In that case you may need to supply compliance documentation. Check Apple's current export rules if you are unsure.
Usage descriptions. If your app or one of its plugins touches the camera, photos, location, microphone, or similar, Info.plist needs a matching NS...UsageDescription string. A missing string typically fails processing with an ITMS- error email. Plugins that use Apple's "required reason" APIs also need a privacy manifest, PrivacyInfo.xcprivacy. Most maintained plugins bundle their own, so keep your dependencies current.
Step 3: Upload the IPA
You have three common options.
| Method | Best for | Notes |
|---|---|---|
| Xcode Organizer | First upload, manual releases | Open `build/ios/archive/Runner.xcarchive` in Xcode, then Distribute App and App Store Connect |
| Transporter app | Uploading an existing IPA without opening Xcode | Drag in the IPA and sign in with your Apple ID |
| `xcrun altool` or the App Store Connect API | CI pipelines | Authenticates with an API key instead of a password |
For command-line upload, create an API key in App Store Connect under Users and Access, then Integrations. Download the .p8 file once, because Apple does not let you download it again. Put it in ~/.appstoreconnect/private_keys/AuthKey_<KEY_ID>.p8, where the tool looks for it:
xcrun altool --upload-app --type ios \
--file build/ios/ipa/my_app.ipa \
--apiKey <KEY_ID> \
--apiIssuer <ISSUER_ID>After upload, the build appears under TestFlight with the status Processing. Processing usually takes from a few minutes to an hour. Apple emails you if it finds a problem, such as a missing usage description, an invalid icon, or an unsupported SDK version.
Step 4: Test with TestFlight
TestFlight has two kinds of testers.
Internal testers are people with an App Store Connect role, up to 100 of them. They can install a build as soon as processing finishes, with no Apple review. Use this group for your own team and for quick checks.
External testers are anyone you invite by email or public link, up to 10,000. The first build of each new version string goes through Beta App Review before external testers can install it. Later builds of the same version usually skip that review unless you change something significant. Review typically takes up to about a day, but this varies.
To add an external group:
- Open TestFlight and choose the app.
- Create a group, then add testers by email or enable a public link with an optional tester cap.
- Fill in Test Information: a description, feedback email, and, if your app has a login, a demo account.
- Add the build to the group and submit it for review.
Testers need the TestFlight app on their device. Each build expires 90 days after upload, so a release candidate that sits for a quarter must be rebuilt. TestFlight also collects crash reports and screenshot feedback, which appear in App Store Connect.
Step 5: Fill in the store listing
Under the App Store tab, create a version, for example 1.2.0. The version string must match the --build-name you used. You must complete these items before you can submit:
- Screenshots for the required device sizes. Apple lets a larger size stand in for smaller ones in many cases, so check the current requirements.
- Description, keywords, support URL, and a privacy policy URL.
- App Privacy: a declaration of what data the app and its SDKs collect and how it is used. Include data collected by analytics, crash reporting, and ad plugins, not only your own code.
- Age rating questionnaire and content rights answers.
- App Review information: contact details, and a working demo account if any feature requires sign-in. A reviewer who cannot log in will reject the app.
- Build: choose the processed build from the Build section.
Step 6: Submit for review and release
Choose Add for Review, then Submit to App Review. Most submissions receive a decision within about one to two days, though timing varies. When you submit, you pick how the release happens:
- Manually release this version: after approval the app waits until you press Release.
- Automatically release: it goes live as soon as it is approved.
- Release on a specific date: it goes live on or after the date you set.
For updates, you can also enable a phased release for automatic updates. Apple rolls the update out to a growing share of users over seven days. You can pause the rollout, but users who search the store and download manually still get the new version immediately.
Common rejection reasons
| Reason | Typical fix |
|---|---|
| Crashes or broken features (guideline 2.1) | Test the release build on a real device and provide a working demo account |
| Missing or vague permission text | Write a specific usage description that explains why the app needs the permission |
| Privacy mismatch (guideline 5.1.1) | Make the privacy label and policy match the SDKs actually in the build |
| Payments outside In-App Purchase (guideline 3.1.1) | Use Apple's purchase system for digital goods |
| Minimal functionality or a web wrapper (guideline 4.2) | Add native value, not only a website in a view |
When a rejection arrives, reply in the Resolution Center. You can fix the metadata and resubmit, or upload a new build with a higher build number and select it.
Exercise
You uploaded build 1.2.0+7 to TestFlight, and a tester finds a bug. You fix it and run flutter build ipa --build-name=1.2.0 --build-number=7. What happens when you upload the new IPA, and what should you do instead?
Show answer
App Store Connect rejects the upload because build number 7 was already used for version 1.2.0. Increase the build number, for example --build-number=8, and upload again. The version name can stay 1.2.0 because the build number is what must be unique within a version.
Exercise
Your team lead wants outside customers to try a build through a public link. Which TestFlight tester type is that, what review does the first build need, and how long does the build stay installable?
Show answer
These are external testers. The first build of each new version string needs Beta App Review before they can install it. The build expires 90 days after upload.
Exercise
Why might the same app pass TestFlight internal testing but be rejected during App Review for privacy reasons?
Show answer
Internal TestFlight builds skip App Review, so no one checks the privacy declarations or usage descriptions against the store's rules. App Review compares the App Privacy answers, privacy policy, and permission strings with the app's actual behavior and SDKs. A mismatch, such as an analytics plugin that collects data you did not declare, causes a rejection.