Skip to content

Instantly share code, notes, and snippets.

@CaiJingLong
Created April 9, 2020 03:10
Show Gist options
  • Save CaiJingLong/dd2c7549e4ab662eb8b6cdfe24b9bcc3 to your computer and use it in GitHub Desktop.
Save CaiJingLong/dd2c7549e4ab662eb8b6cdfe24b9bcc3 to your computer and use it in GitHub Desktop.
build ios shell by @AlexVincent525
# remove iOS bitcode
flutter build ios
cd build/ios/iphoneos/Runner.app/Frameworks
cd App.framework
xcrun bitcode_strip -r app -o app
cd ..
cd Flutter.framework
xcrun bitcode_strip -r Flutter -o Flutter
cd ../../../../../../
# remove iOS bitcode and no signed build
flutter build ios
rm -rf build/export
mkdir -p build/export
cd build/ios/iphoneos/Runner.app/Frameworks
cd App.framework
xcrun bitcode_strip -r app -o app
cd ..
cd Flutter.framework
xcrun bitcode_strip -r Flutter -o Flutter
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment