存档时编译框架会提供位码错误 [英] Compiled framework provides bitcode error when archiving

查看:143
本文介绍了存档时编译框架会提供位码错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经苦苦挣扎了几天...基本上,我已经构建了一个已发布的已编译框架,并将其与cocoaPods一起分发.问题在于,然后将此框架应用程序存档会出现以下错误:

have been struggling for few days... Basically I have build a compiled released framework and distribute it with cocoaPods. The problem is that then archiving this framework application gets the following error:

ld: bitcode bundle could not be generated because '/.../testingPodsAcrossversions/Pods/Pod/Pod.framework/Pod' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/.../testingPodsAcrossversions/Pods/Pod/Pod.framework/Pod' for architecture arm64

我做了这些事情:

搜索启用位码"设置,并在调试"和释放"模式下将其设置为是".

Search for Enable Bitcode setting and set it to YES for Debug and Release modes. 

搜索位码设置.在调试和发布模式下添加-fembed-bitcode,也可以在调试和发布模式中添加-fembed-bitcode-marker 释放模式下的-fembed-bitcode.

Search for bitcode settings. Add -fembed-bitcode in both Debug and Release modes or you can add -fembed-bitcode-marker in Debug and  -fembed-bitcode in Release mode.

在用户定义"设置下添加BITCODE_GENERATION_MODE ,然后为调试"和发布"模式添加位代码,或者您可以在调试"和发布"模式中添加位代码.

Add BITCODE_GENERATION_MODE under User Defined setting , and then add bitcode for both Debug and Release modes or you can add markerin Debug and bitcode in Release mode.

我只需要发布版本,所以我没有构建通用框架,只是发布版本...我真的想解决这个问题,因为这对我来说是一场噩梦..

I only need release version, so I did not built an universal framework, just release version... I would genuinely like to solve this issue, because it has been a nightmare for me..

推荐答案

如果您使用的是Pod,请尝试将其添加到Podfile中(它为我解决了相同的问题):

If you're using pods, try adding this to the Podfile (it resolved the same issue for me):

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

这篇关于存档时编译框架会提供位码错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆