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.
The "build active architecture only" setting causes everything except the current Mac's architecture to be ignored (and the current one is of course valid), hiding the problem. Instead, you should look up a row or two in the settings, and change the "Architectures" setting to "Standard".
Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.
You can manually add the Excluded Architecture in your Pod project's Build Settings, but it will be overwritten when you use pod install . In place of this, you can add this snippet in your Podfile . It will write the necessary Build Settings every time you run pod install .
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With