Created
August 22, 2015 16:41
-
-
Save jaredsinclair/4de506e108249f39b12d to your computer and use it in GitHub Desktop.
Podfile post-install script for best-practice code signing settings.
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_representation| | |
installer_representation.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.to_s == 'Beta' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
elsif config.to_s == 'Release' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shout out to @traviscrist for how to construct a post_install script this way. CocoaPods/CocoaPods#3811