在原生的iOS工程里面,包含了flutter模块,直接对原生项目打包时报了下面这个错误:
/ios/Flutter/Flutter.framework/Flutter’ was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file ‘/Users/—r/ios/Flutter/Flutter.framework/Flutter’ for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) Search for Enable Bitcode setting and set it to YES for Debug and Release modes.
从报错信息来看,该报错信息是因为flutter模块里面的内容不是全部支持bitcode导致的,但我将项目里面的Enable Bitcode设置为NO时,并没有解决问题:
不需要将Enable Bitcode设置为NO,在flutter项目里面,依次执行以下命令:
flutter clean
flutter build ios
如果报签名报错,可以用下面的命令build iOS
flutter build ios --release --no-codesign
执行完成后在原生项目打包
网友评论