Guide · Flutter · Native Builds
Flutter to APK, AAB and IPA: release builds without Xcode
Nathan Claiborne
Flutter abstracts mobile development, but stores still require native binaries: an APK or AAB for Android and an IPA for iOS. This guide covers how to convert your Flutter codebase into those native packages using
flutter build on Corenna or GitHub Actions, without installing Xcode or Android Studio locally.What converting Flutter to native means
- Not rewriting: your Dart/Flutter code stays unchanged. Flutter's toolchain compiles it to native ARM and x86 machine code.
- Android output:
flutter build apkproduces a universal APK;flutter build appbundleproduces a Google Play-optimized AAB. - iOS output:
flutter build ipaproduces an App Store / TestFlight-ready .ipa archive. - Signing required: both platforms need cryptographic signatures: an Android keystore and iOS certificate + provisioning profile.
How Flutter compiles to native code
- Dart AOT: Dart compiles Ahead-Of-Time to native machine code for the target architecture (arm64, armeabi-v7a, x86_64).
- Android embedding: the Flutter engine links into a standard Android Gradle project; the output is a standard .apk or .aab.
- iOS embedding: the engine links into an Xcode project; the output is a standard .ipa built with xcodebuild.
- Plugins: native platform plugins (camera, push, etc.) are compiled and linked alongside the Flutter engine.
Prerequisites
- A Flutter project with
pubspec.yaml,android/, andios/directories. - Flutter 3.22+ recommended for current stable tooling.
- Android keystore. See Android keystore guide.
- iOS distribution certificate (.p12) and provisioning profile. See iOS code signing explained.
Convert Flutter to Android native (APK and AAB)
On your machine or in CI:
# APK, installs directly on devices
flutter build apk --release
# AAB, optimized for Google Play dynamic delivery
flutter build appbundle --releaseThe APK lands in build/app/outputs/flutter-apk/; the AAB lands in build/app/outputs/bundle/release/. Both must be signed with a release keystore before Play Store acceptance. In CI, decode the keystore from a base64 secret and wire signing credentials in android/app/build.gradle.
Convert Flutter to iOS native (IPA)
iOS requires a macOS environment with Xcode:
flutter build ipa --release --export-options-plist=ios/ExportOptions.plistThe IPA lands in build/ios/ipa/. Before building, import your .p12 into a temporary keychain and install the provisioning profile so xcodebuild can sign the archive. The ExportOptions.plist selects distribution type (app-store, ad-hoc, or development).
GitHub Actions workflow for Flutter-to-native CI
Create .github/workflows/flutter-native.yml:
name: Flutter to Native
on:
push: { branches: [main] }
workflow_dispatch: {}
jobs:
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with: { distribution: temurin, java-version: '17' }
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: flutter pub get
- name: Decode keystore
run: echo "$KEYSTORE_B64" | base64 -d > android/app/release.keystore
env: { KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }} }
- run: flutter build apk --release
- run: flutter build appbundle --release
- uses: actions/upload-artifact@v4
with:
name: flutter-android
path: |
build/app/outputs/flutter-apk/app-release.apk
build/app/outputs/bundle/release/app-release.aab
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: flutter pub get
- name: Import signing
run: |
echo "$P12_B64" | base64 -d > cert.p12
security create-keychain -p "" build.keychain
security import cert.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
security list-keychains -s build.keychain
security unlock-keychain -p "" build.keychain
env:
P12_B64: ${{ secrets.IOS_P12_B64 }}
P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }}
- name: Install profile
run: |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
echo "$PROFILE_B64" | base64 -d > ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision
env: { PROFILE_B64: ${{ secrets.IOS_PROFILE_B64 }} }
- run: flutter build ipa --release --export-options-plist=ios/ExportOptions.plist
- uses: actions/upload-artifact@v4
with: { name: flutter-ios, path: build/ios/ipa/*.ipa }Corenna: convert Flutter to native without YAML
- Connect your Flutter repo to Corenna via the GitHub App.
- Let Corenna create your Android signing key on the first build (or upload the one you already use), and add your iOS .p12 and provisioning profile once.
- Select APK, AAB, or IPA and trigger a build.
- The workflow runs
flutter buildon a GitHub runner, signs the result with your key, and hands you the file.
Common Flutter-to-native build errors
- "Could not find an option named 'release'": you're on an old Flutter SDK; upgrade or omit
--release. - "Execution failed for task ':app:lintVitalRelease'": fix lint errors or disable
checkReleaseBuildsin Gradle. - "No signing certificate iOS Distribution found": re-check the .p12 password and keychain import steps.
- CocoaPods checksum mismatch: delete
ios/Podfile.lockin CI and rebuild. - Missing
ExportOptions.plist: create one matching your provisioning profile's distribution method.
Architecture support and app size
- Android: Flutter builds arm64-v8a, armeabi-v7a, and x86_64 by default. Use
--split-per-abifor smaller per-architecture APKs, or upload an AAB and let Play generate optimized APKs. - iOS:
flutter build ipatargets arm64 for devices and x86_64 for the simulator; App Store distribution strips simulator slices automatically. - Size: a universal release APK carries the engine for every architecture, so even a small app runs to tens of megabytes (Corenna’s public test app is 41 MB). A per-architecture APK, or an AAB that Play splits for you, is much smaller.
FAQ: signing, certificates, and store submission
- Do I need a paid Apple Developer account to build a Flutter IPA?
- Yes. Apple requires an active Apple Developer Program membership ($99/year) to generate distribution certificates and provisioning profiles. Without it, you can only build for the iOS Simulator.
- Can I reuse the same Android keystore across multiple Flutter apps?
- Technically yes, but it is not recommended. Each app should have its own unique keystore. If you ever need to transfer an app to another developer or lose the keystore, Google Play will not let you update the app with a different signing key.
- Why does my iOS build fail with "No signing certificate" in CI but work on my Mac?
- Your local Mac likely has the certificate installed in the login keychain. In CI, you must explicitly create a keychain, import the .p12, and unlock it before running
xcodebuild. Also verify the certificate has not expired. - What is the difference between ad-hoc and App Store distribution?
- Ad-hoc lets you install the IPA on up to 100 registered devices for testing. App Store distribution is required for TestFlight and the App Store. Your provisioning profile and
ExportOptions.plistmust match the chosen method. - How do I handle Flutter plugins that require native iOS frameworks?
- Most plugins declare native dependencies in their
podspecfiles, and CocoaPods resolves them automatically duringflutter build ipa. If a plugin requires a custom iOS framework or entitlements, updateios/Runner/Info.plistor the Xcode project manually. - Will Google Play accept a debug-signed Flutter APK?
- No. Google Play requires release signing with a private keystore. Debug signatures are auto-generated by the IDE and will be rejected during upload. Always use
flutter build appbundle --releasewith a valid keystore. - How do I rotate an expired iOS distribution certificate without breaking existing users?
- You can create a new distribution certificate in the Apple Developer portal and update your provisioning profile to reference it. Re-signing with the new certificate does not affect already-installed apps. Just make sure your CI secrets are updated with the new .p12.
- My Flutter app uses Firebase. Does that change the signing process?
- Firebase itself does not change code signing, but you must download the correct
google-services.json(Android) andGoogleService-Info.plist(iOS) for your release bundle ID. Mismatched bundle IDs will cause runtime crashes even if the build succeeds. - Can I submit the same build artifact to both the App Store and TestFlight?
- Yes. When you upload a signed IPA to App Store Connect via Transporter or Xcode, the same binary can be distributed to internal testers (TestFlight) and external App Store review. You do not need to rebuild.
- Does Corenna cache Flutter dependencies between builds?
- Only the Flutter SDK. It is cached between runs, so later builds skip that download. Gradle and CocoaPods dependencies are fetched on every build.
FAQ: Android Play Store submission gotchas
- Why does Google Play reject my APK with "You need to use a different package name"?
- If you previously uploaded a debug or internal build under a different Play Console app entry, you cannot reuse that package name. Each Play Store app must have a globally unique package name. Make sure
applicationIdinandroid/app/build.gradlematches the app you intend to update. - AAB vs APK: which should I upload to Google Play?
- AAB is required for new apps on Google Play. It lets Play generate optimized APKs per device. You can still distribute APKs directly for side-loading or internal testing, but the store listing should use an AAB. Use
flutter build appbundle --release. - My AAB passes local tests but fails Play Console's "App bundle integrity" check. Why?
- This usually means the signing key used for the AAB does not match the key registered in Play App Signing, or the AAB contains debug symbols that were not stripped. Verify your CI keystore matches the upload key in the Play Console, and enable
minifyEnabledandshrinkResourcesin your release build type. - How do I handle targetSdkVersion requirements when Flutter pins an older Android SDK?
- Google Play periodically raises the minimum
targetSdkVersion. If your Flutter template pins an older version, updatecompileSdkandtargetSdkVersioninandroid/app/build.gradleto the latest stable value supported by your Flutter version, then test thoroughly on Android 14+ devices. - What causes the "Your app currently targets API level X and must target at least API level Y" error?
- This is a Play Console policy block, not a build error. It means your app's
targetSdkVersionis below Google's current mandate. Update it in Gradle, rebuild your AAB, and re-upload. Do not attempt to bypass this with older Console entries. It will fail review. - Do I need to upload separate AABs for phone and tablet form factors?
- No. A single AAB covers all form factors that your Flutter app supports. Play's dynamic delivery serves the correct resources and native libraries per device. Just ensure your app declares proper screen-size support in
AndroidManifest.xml. - Why is my Flutter app size much larger on Play than locally?
- Play Console shows the download size, not the raw AAB size. It also reports the installed size on disk, which includes extracted native libraries. Use
--split-debug-infoand--obfuscateto reduce Flutter release size, and upload an AAB so Play serves compressed per-architecture binaries. - Can I switch from APK to AAB for an existing Play Store app without losing users?
- Yes. Just start uploading AABs instead of APKs for your next release. Existing users will continue to receive updates as normal. Play App Signing may need to be enabled if it wasn't already: the Console will prompt you during the first AAB upload.
- What should I do if Play Console warns about "Native code transparency"?
- This warning appears when native libraries in your AAB do not include debug symbols or symbol tables are stripped. Flutter apps typically strip symbols in release mode. You can safely ignore this warning unless you need stack symbolication for crash reporting, in which case upload the unstripped symbols to your crash reporter separately.
- Does Corenna handle Play Console API uploads automatically?
- Yes, for Google Play. Connect a Google Play service account once and Corenna sends the signed AAB straight to your internal, closed, open, or production track, with release notes. No follow-up workflow step to write. A brand-new app's first release still has to be created in the Play Console, which Google requires. The signed IPA you upload to App Store Connect yourself.
Keep reading
- Build signed Flutter APK and IPA from GitHub
- Flutter 3.50: Android Gradle Plugin below 9.1.1
- How to build an APK from GitHub
- Build an Android App Bundle (.aab) from GitHub
- Build a signed iOS .ipa from GitHub
- Android keystore: generate, store, rotate
- iOS code signing explained
- Choosing a mobile build stack in 2026