已经苦苦挣扎了几天...基本上我已经构建了一个编译发布的框架并使用 cocoaPods 分发它。问题是归档此框架应用程序会出现以下错误:
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
我做过这些事情:
搜索启用位码设置并将其设置为调试和 Release模式的是。
搜索位码设置。在 Debug 和 Release 模式下添加 -fembed-bitcode 或者您可以在 Debug 和 Release 模式下添加 -fembed-bitcode-marker - Release模式下的 fembed-bitcode。
在 User Defined 设置下添加 BITCODE_GENERATION_MODE,然后为 Debug 和 Release 模式添加 bitcode,或者您可以在 Debug 中添加标记,在 Release 模式中添加 bitcode。
我只需要发布版本,所以我没有构建通用框架,只是发布版本...我真的很想解决这个问题,因为这对我来说是一场噩梦..
最佳答案
如果您使用的是 Pod,请尝试将其添加到 Podfile(它为我解决了同样的问题):
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
关于ios - 编译框架在归档时提供位码错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54082111/