Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a Flutter .apk and .ipa file to upload it to Firebase App Distribution
  • Put build.sh in ./your-flutter-project-directory/build.sh
  • Put ExportOptions.plist in ./your-flutter-project-directory/ios/ExportOptions.plist
  • Run ./build.sh
flutter build apk
flutter build ios
rm -rf build/export
mkdir -p build/export
cp build/app/outputs/apk/release/app-release.apk build/export
cd ios
xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphoneos -configuration Release archive -archivePath $PWD/build/Runner.xcarchive
xcodebuild -exportArchive -archivePath $PWD/build/Runner.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath $PWD/build/Runner.ipa -allowProvisioningUpdates
cd ..
cp ios/build/Runner.ipa/Runner.ipa build/export
open build/export
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
<key>uploadBitcode</key>
<false/>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
@ollydixon
Copy link

ollydixon commented Jun 3, 2022

Bad state: No element

The ExportOptions.plist is incomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment