Prepare the keychain build.keychain
:
$ security create-keychain -p travis build.keychain
$ security default-keychain -s build.keychain
$ security unlock-keychain -p travis build.keychain
$ security set-keychain-settings -t 3600 -l ~/Library/Keychains/build.keychain
$ security import signing/apple.cer -k ~/Library/Keychains/build.keychain -T /usr/bin/codesign
certificate imported.
Add your personal ios.p12
keystore...
$ security import signing/ios.p12 -k ~/Library/Keychains/build.keychain -P $IOS_P12_PASSWORD -T /usr/bin/codesign
identity imported.
and the mobile provisioning profile (ios.mobileprovision
):
$ mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp signing/ios.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
During setup some useful hints were found at How to install developer certificate/private key and provisioning profile for iOS development via command line?
Just in case something weird happens “Try to turn it off and on again”…no kidding!