问题:
项目是iOS原生和Flutter混编的,今天打包出现了如下错误:
Bitcode bundle could not be generated because
'/Users/yuhua/Library/Developer/Xcode/DerivedData/SmarterLifeV4-
czvdwotaihmeahgulpjtacuurjpl/Build/Intermediates.noindex/ArchiveInter
mediates/SmarterLifeV4/BuildProductsPath/Release-
iphoneos/XCFrameworkIntermediates/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/yuhua/Library/Developer/Xcode/DerivedData/SmarterLifeV4-
czvdwotaihmeahgulpjtacuurjpl/Build/Intermediates.noindex/ArchiveInter
mediates/SmarterLifeV4/BuildProductsPath/Release-
iphoneos/XCFrameworkIntermediates/Flutter/Flutter.framework/Flutter'
for architecture armv7
解决问题
首先分析问题,字面描述就是Flutter.framework不包含完整的bitcode。重点是bitcode。解决步骤如下:
- 1.先去flutter项目中,找到iOS项目目录,打开,将项目的bitcode关闭。
- 2.然后再flutter项目中使用如下命令
flutter build ios
这一步大概率会需要设置iOS项目的包名和证书,设置好即可。
- 3.回到iOS项目中,打包。好了,问题解决。
网友评论