离子电容器随机错误

时间:2018-10-22 20:14:36

标签: xcode ionic-framework capacitor

Documents/Ionic Projects/Skwap/node_modules/@capacitor/cli/assets/capacitor-cordova-ios-plugins/sources/CordovaPluginFacebook4/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit(FBSDKConstants.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

当我尝试构建我的应用并使用xcode运行时,此错误已开始弹出。一切都能在浏览器中正常工作,因此电容器一定是错误的。

我已经按照说的做,并且在应用程序和Pod设置中都禁用了位码。 随之而来的是“ Command CompileSwift失败,退出代码非零”。

我已经更新了所有npm软件包,但仍然没有更改。

1 个答案:

答案 0 :(得分:0)

最新版本的cordova-plugin-facebook4更新了Facebook框架文件,并且看起来它们没有启用位码,因此您必须在目标中将其禁用才能使构建工作。 (或降级到该插件的先前版本并运行npx cap update

要在所有目标中禁用位码,可以将其添加到ProjectName/ios/App/Podfile,然后运行npx cap update

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = 'NO'
        end
    end
end