问题
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