Build active architecture only for CocoaPods needs to be NO in Xcode

有些话、适合烂在心里 提交于 2019-12-23 12:09:45

问题


In an old project where we use cocoapods, there is a strange problem since Xcode 6: when compiling for iphone (not simulator), some random cocoapods are not found while building (e.g. Flurry). In Xcode 5 everything is fine. This is with When 'Build active architecture only = YES' in the Cocoapods target.

When 'Build active architecture only = NO', everything works as expected.

Why is this? I've already rebuilt cocoapods a few times, but it keeps the same.


回答1:


Append to your Podfile:

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


来源:https://stackoverflow.com/questions/26160952/build-active-architecture-only-for-cocoapods-needs-to-be-no-in-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!