Skip to content

Instantly share code, notes, and snippets.

@hjue
Forked from CaiJingLong/build_ios.sh
Created September 1, 2020 07:14
Show Gist options
  • Save hjue/8bde19265190569e42387d14ada3d349 to your computer and use it in GitHub Desktop.
Save hjue/8bde19265190569e42387d14ada3d349 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