Sub topic 13
Publishing through TestFlight and the App Store
Assume you know basic Flutter development, can use the flutter command, and have access to macOS with Xcode. You also need an Apple Developer Program account, an app record in App Store Connect, and an iOS device for testing.
Understand the release path
TestFlight is Apple's service for distributing pre-release builds. It lets your team and external testers install an app before App Store review. The App Store is the public distribution channel. Both use an uploaded build from App Store Connect.
The usual path is:
An iOS build has two important version values:
- The marketing version, such as
1.2.0, shown to users. - The build number, such as
7, which must increase for every uploaded build with the same marketing version.
Set these values in pubspec.yaml:
name: my_app
description: Example app
version: 1.2.0+7Xcode uses these values when Flutter generates the iOS build settings. Before uploading another build, increase the build number. Apple rejects an upload when its build number has already been used.
Configure signing and build the IPA
iOS signing connects your app to your Apple Developer team. Xcode manages certificates and provisioning profiles when automatic signing is enabled. A provisioning profile authorizes a particular app identifier, team, and distribution method.
Open ios/Runner.xcworkspace, not ios/Runner.xcodeproj, in Xcode. Select the Runner target, then open Signing & Capabilities. Choose your team and confirm that the bundle identifier matches the app record in App Store Connect. For example, com.example.myapp must match exactly.
Use a unique bundle identifier that you control. Changing it after release creates a different App Store app rather than renaming the existing one.
Build the archive and IPA from the project root:
flutter clean
flutter pub get
flutter build ipa --releaseThe resulting IPA is normally placed under build/ios/ipa. Flutter invokes Xcode's archive and export steps using the signing configuration in the project.
Upload and test with TestFlight
You can upload the IPA with Xcode's Organizer, Apple's Transporter app, or a CI service. After processing finishes, App Store Connect displays the build under the app's TestFlight section.
Internal testers belong to your App Store Connect team. External testers do not need to belong to the team, but the first external build may require Apple's beta review. Add testing instructions, test credentials, and known limitations when requested.
Test release behavior on a real device. Check permissions, push notifications, deep links, purchases, network configuration, startup time, and behavior without debug services. A release build can expose problems hidden by debug mode.
Submit the app
Create or select an App Store version, choose the processed build, complete the metadata, provide screenshots, answer export-compliance questions, and submit the version for review. App privacy details must match the data your app and its services collect.
After approval, release the app manually or configure automatic release. If review finds a problem, fix it, increase the build number, upload a new IPA, and select the new build.
Exercise
You uploaded build 7 of version 1.2.0 to TestFlight and found a crash. What must change before uploading the fix?
Show answer
Keep or change the marketing version as appropriate, but increase the build number to at least 8, rebuild, and upload the new IPA.