| [ Web Proxy ] |
| Viewing: https://docs.flutter.dev/deployment/macos | [Back] [Original] |
docs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.
How to release a Flutter app to the macOS App Store.
This guide provides a step-by-step walkthrough of releasing a Flutter app to the App Store.
Before beginning the process of releasing your app, ensure that it meets Apple's App Review Guidelines.
In order to publish your app to the App Store, you must first enroll in the Apple Developer Program. You can read more about the various membership options in Apple's Choosing a Membership guide.
Manage your app's life cycle on App Store Connect (formerly iTunes Connect). You define your app name and description, add screenshots, set pricing, and manage releases to the App Store and TestFlight.
Registering your app involves two steps: registering a unique Bundle ID, and creating an application record on App Store Connect.
For a detailed overview of App Store Connect, see the App Store Connect guide.
Every macOS application is associated with a Bundle ID, a unique identifier registered with Apple. To register a Bundle ID for your app, follow these steps:
Register your app on App Store Connect:
For a detailed overview, see Add an app to your account.
This step covers reviewing the most important settings in the Xcode workspace. For detailed procedures and descriptions, see Prepare for app distribution.
Navigate to your target's settings in Xcode:
Runner.xcworkspace in your app's macos folder.Verify the most important settings.
In the Identity section:
App CategoryThe app category under which your app will be listed on the Mac App Store. This cannot be none.
Bundle IdentifierThe App ID you registered on App Store Connect.
In the Deployment info section:
Deployment TargetThe minimum macOS version that your app supports. To check which versions of macOS that Flutter supports deploying to, check out Flutter's Supported deployment platforms.
In the Signing & Capabilities section:
Automatically manage signing
Whether Xcode should automatically manage app signing
and provisioning. This is set true by default, which should
be sufficient for most apps. For more complex scenarios,
see the Code Signing Guide.
TeamSelect the team associated with your registered Apple Developer account. If required, select Add Account..., then update this setting.
The General tab of your project settings should resemble the following:
For a detailed overview of app signing, see Create, export, and delete signing certificates.
The configuration for the product identifiers are centralized
in macos/Runner/Configs/AppInfo.xcconfig. For the app's name,
set PRODUCT_NAME, for the copyright set PRODUCT_COPYRIGHT,
and finally set PRODUCT_BUNDLE_IDENTIFIER for the app's
bundle identifier.
The default version number of the app is 1.0.0.
To update it, navigate to the pubspec.yaml file
and update the following line:
version: 1.0.0+1
The version number is three numbers separated by dots,
such as 1.0.0 in the example above, followed by an optional
build number such as 1 in the example above, separated by a +.
Both the version and the build number can be overridden in Flutter's
build by specifying --build-name and --build-number,
respectively.
In macOS, build-name uses CFBundleShortVersionString
while build-number uses CFBundleVersion.
Read more about iOS versioning at Core Foundation Keys
on the Apple Developer's site.
When a new Flutter app is created, a placeholder icon set is created. This step covers replacing these placeholder icons with your app's icons:
Assets.xcassets in the
Runner folder. Update the placeholder icons with your own app icons.
flutter run -d macos.
This step covers creating a build archive and uploading your build to App Store Connect using Xcode.
During development, you've been building, debugging, and testing with debug builds. When you're ready to ship your app to users on the App Store or TestFlight, you need to prepare a release build. At this point, you might consider obfuscating your Dart code to make it more difficult to reverse engineer. Obfuscating your code involves adding a couple flags to your build command.
In Xcode, configure the app version and build:
Runner.xcworkspace in your app's macos folder. To do this from
the command line, run the following command from the base directory of your
application project.open macos/Runner.xcworkspace
Finally, create a build archive and upload it to App Store Connect:
flutter build macos
You should receive an email within 30 minutes notifying you that your build has been validated and is available to release to testers on TestFlight. At this point you can choose whether to release on TestFlight, or go ahead and release your app to the App Store.
For more details, see Upload an app to App Store Connect.
This step covers creating a build archive and uploading your build to App Store Connect using Flutter build commands and Codemagic CLI Tools executed in a terminal in the Flutter project directory.
Install the Codemagic CLI tools:
pip3 install codemagic-cli-tools
You'll need to generate an App Store Connect API Key with App Manager access to automate operations with App Store Connect. To make subsequent commands more concise, set the following environment variables from the new key: issuer id, key id, and API key file.
export APP_STORE_CONNECT_ISSUER_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
export APP_STORE_CONNECT_KEY_IDENTIFIER=ABC1234567
export APP_STORE_CONNECT_PRIVATE_KEY=`cat /path/to/api/key/AuthKey_XXXYYYZZZ.p8`
You need to export or create a Mac App Distribution and a Mac Installer Distribution certificate to perform code signing and package a build archive.
If you have existing certificates, you can export the private keys by executing the following command for each certificate:
openssl pkcs12 -in <certificate_name>.p12 -nodes -nocerts | openssl rsa -out cert_key
Or you can create a new private key by executing the following command:
ssh-keygen -t rsa -b 2048 -m PEM -f cert_key -q -N ""
Later, you can have CLI tools automatically create a new Mac App Distribution and Mac Installer Distribution certificate. You can use the same private key for each new certificate.
Fetch the code signing files from App Store Connect:
app-store-connect fetch-signing-files YOUR.APP.BUNDLE_ID \
--platform MAC_OS \
--type MAC_APP_STORE \
--certificate-key=@file:/path/to/cert_key \
--create
Where cert_key is either your exported Mac App Distribution certificate private key
or a new private key which automatically generates a new certificate.
If you do not have a Mac Installer Distribution certificate, you can create a new certificate by executing the following:
app-store-connect certificates create \
--type MAC_INSTALLER_DISTRIBUTION \
--certificate-key=@file:/path/to/cert_key \
--save
Use cert_key of the private key you created earlier.
Fetch the Mac Installer Distribution certificates:
app-store-connect certificates list \
--type MAC_INSTALLER_DISTRIBUTION \
--certificate-key=@file:/path/to/cert_key \
--save
Set up a new temporary keychain to be used for code signing:
keychain initialize
After running keychain initialize you must run the following:
keychain use-login
This sets your login keychain as the default to avoid potential authentication issues with apps on your machine.
Now add the fetched certificates to your keychain:
keychain add-certificates
Update the Xcode project settings to use fetched code signing profiles:
xcode-project use-profiles
Install Flutter dependencies:
flutter packages pub get
Install CocoaPods dependencies:
find . -name "Podfile" -execdir pod install \;
Build the Flutter macOS project:
flutter build macos --release
Package the app:
APP_NAME=$(find $(pwd) -name "*.app")
PACKAGE_NAME=$(basename "$APP_NAME" .app).pkg
xcrun productbuild --component "$APP_NAME" /Applications/ unsigned.pkg
INSTALLER_CERT_NAME=$(keychain list-certificates \
| jq '[.[]
| select(.common_name
| contains("Mac Developer Installer"))
| .common_name][0]' \
| xargs)
xcrun productsign --sign "$INSTALLER_CERT_NAME" unsigned.pkg "$PACKAGE_NAME"
rm -f unsigned.pkg
Publish the packaged app to App Store Connect:
app-store-connect publish \
--path "$PACKAGE_NAME"
As mentioned earlier, don't forget to set your login keychain as the default to avoid authentication issues with apps on your machine:
keychain use-login
TestFlight allows developers to push their apps to internal and external testers. This optional step covers releasing your build on TestFlight.
See distribution guide to prepare an archive for distribution to designated Mac computers.
When you're ready to release your app to the world, follow these steps to submit your app for review and release to the App Store:
Apple notifies you when their app review process is complete. Your app is released according to the instructions you specified in the Version Release section.
For more details, see Distribute an app through the App Store.
The Distribute your app guide provides a detailed overview of the process of releasing an app to the App Store.
To learn how to package and distribute your Flutter desktop app for macOS the open source way, without using a paid Apple developer account, check out the step-by-step macOS packaging guide.
Unless stated otherwise, the documentation on this site reflects Flutter 3.44.7. Page last updated on 2026-07-31. View source or report an issue.
| Web Proxy Viewer | New URL | Original Page |