Skip to content

Instantly share code, notes, and snippets.

@funroll
Created June 22, 2014 04:23
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save funroll/7faf18b4972d72cd284e to your computer and use it in GitHub Desktop.
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.
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
@funroll
Copy link
Author

funroll commented Jul 9, 2014

@dbrisinda Thanks for that version--handy to have both in one!

@nickjbauer
Copy link

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

@peterjenkins
Copy link

@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