gpt4 book ai didi

不包括设备位码上的 iOS 框架

转载 作者:可可西里 更新时间:2023-11-01 04:49:55 25 4
gpt4 key购买 nike

我正在为 iOS 开发静态库,其中我使用的是 Alamofire。当我尝试为模拟器构建发布时,一切正常,但是当我尝试为设备(发布或调试)构建它时,我遇到以下问题:

ld: bitcode bundle could not be generated because '/PathToMyLibraryProducts/Release-iphoneos/Alamofire/Alamofire.framework/Alamofire' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture armv7

我的框架启用了bitcode,而且是fat framework(为设备和模拟器构建)。我该如何解决?

最佳答案

如果你在 cocoapods 中使用 cocoapods-binary

此错误将出现,因为 cocoapods-binary 不会生成启用了 bitcode 的框架,除非您通过在 Podfile 中使用此 key 明确指出:

enable_bitcode_for_prebuilt_frameworks

这就是您的 Podfile 的样子:

plugin 'cocoapods-binary'

platform :ios, '12.0'
use_frameworks!
enable_bitcode_for_prebuilt_frameworks!
all_binary!

target 'ProjectName' do
pod 'Alamofire'
end

关于不包括设备位码上的 iOS 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43252566/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com