仅为CocoaPods构建活动架构需要在Xcode中为否 [英] Build active architecture only for CocoaPods needs to be NO in Xcode
问题描述
在一个使用cocoapods的旧项目中,自Xcode 6起存在一个奇怪的问题:在为iPhone(不是模拟器)进行编译时,在构建时未发现一些随机的cocoapods(例如Flurry)。在Xcode 5中,一切都很好。这与Cocoapods目标中的仅构建活动架构= YES一起使用。
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.
当仅构建活动架构= NO时,一切都按预期进行。
When 'Build active architecture only = NO', everything works as expected.
这是为什么?我已经重建了cocoapods几次,但是它保持不变。
Why is this? I've already rebuilt cocoapods a few times, but it keeps the same.
推荐答案
附加到您的Podfile:
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
这篇关于仅为CocoaPods构建活动架构需要在Xcode中为否的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!