post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'YES' end end end
但 Archive 时会报错,类似如下的错误输出:
bitcode bundle could not be generated because '/.../.ios/Flutter/engine/Flutter.framework/Flutter' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/.../.ios/Flutter/engine/Flutter.framework/Flutter'for architecture armv7
找了一圈得到的回复基本都是 修改 pod 库的 ENABLE_BITCODE = NO(因为 Flutter 现在不支持 bitcode),所以暂时关闭了。
[✓] Flutter (Channel unknown, 1.22.3, on Mac OS X 10.15.5 19F96, locale zh-Hans-CN) • Flutter version 1.22.3 at /Users/eyrefree/Documents/Tools/flutter • Framework revision 8874f21e79 (3 weeks ago), 2020-10-29 14:14:35 -0700 • Engine revision a1440ca392 • Dart version 2.10.3 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0) • Android SDK at /Users/eyrefree/Library/Android/sdk • Platform android-30, build-tools 30.0.0 • ANDROID_HOME = /Users/eyrefree/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.2, Build version 12B45b • CocoaPods version 1.10.0
[✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 46.0.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.51.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.16.0