AFNetworking 是在没有完整位码的情况下构建的

AFNetworking was built without full bitcode

我在项目中启用位码时遇到错误 "AFNetworking was built without full bitcode"。 那里还有一个open issue

如果有人解决了问题,请帮助我。

AFNetworking 版本:3.2.1

详细错误:"ld: bitcode bundle could not be generated because '/Users/Library/Developer/Xcode/DerivedData/ServiceSDK-hkwcndktudaxkjebecaqimswckgp/Build/Products/Release-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/Library/Developer/Xcode/DerivedData/ServiceSDK-hkwcndktudaxkjebecaqimswckgp/Build/Products/Release-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking' for architecture armv7"

好的,所以我通过在 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

可能会对其他人有所帮助。

谢谢