Created
January 25, 2017 10:51
-
-
Save nsomar/d7611a5fabcf21954b96a604529ebc2d to your computer and use it in GitHub Desktop.
Sign an ipa on travis
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
| #!/bin/sh | |
| # Create a custom keychain | |
| security create-keychain -p travis ios-build.keychain | |
| # Make the custom keychain default, so xcodebuild will use it for signing | |
| security default-keychain -s ios-build.keychain | |
| # Unlock the keychain | |
| security unlock-keychain -p travis ios-build.keychain | |
| # Set keychain timeout to 1 hour for long builds | |
| # see http://www.egeek.me/2013/02/23/jenkins-and-xcode-user-interaction-is-not-allowed/ | |
| security set-keychain-settings -t 3600 -l ~/Library/Keychains/ios-build.keychain | |
| # Add certificates to keychain and allow codesign to access them | |
| security import ./scripts/travis/apple.cer -k ~/Library/Keychains/ios-build.keychain -A | |
| security import ./scripts/travis/dist.cer -k ~/Library/Keychains/ios-build.keychain -A | |
| security import ./scripts/travis/dist.p12 -k ~/Library/Keychains/ios-build.keychain -P $KEY_PASSWORD -A | |
| security set-key-partition-list -S apple-tool:,apple: -s -k "travis" "ios-build.keychain" | |
| # Put the provisioning profile in place | |
| mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
| cp "./scripts/travis/$PROFILE_NAME.mobileprovision" ~/Library/MobileDevice/Provisioning\ Profiles/ | |
| 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment