See CocoaPods arm64 issue for details.
Created
June 22, 2014 04:23
-
-
Save funroll/7faf18b4972d72cd284e to your computer and use it in GitHub Desktop.
CocoaPods post_install step for changing Build Active Architecture Only from Yes to No.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install do |installer| | |
installer.project.targets.each do |target| | |
target.build_configurations.each do |configuration| | |
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO' | |
end | |
end | |
end |
This is an improved version that combines the above two versions and works for Xcode 5.1.1. Based on the (updated) original by Cameron Spickert.
# Remove 64-bit build architecture from all pod targets and override 'Build Active Architecture Only' to NO.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['VALID_ARCHS'] = '$(ARCHS_STANDARD_32_BIT)'
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
@dbrisinda Thanks for that version--handy to have both in one!
Updated for more recent: cocoapods 0.39.0 (unsure what other versions it supports).
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
@nickjbauer Thanks for the update, that works with CocoaPods 1.0 as well.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I also found this post_install step helpful.