- Download the
cli.sh
and move it into ascripts/
directory and executechmod 755 scripts/cli.sh
, this will make the script executable. - Export your
iOS Distribution
private key from your Keychain into thescripts/
folder and name itios_distribution.p12
make sure to note down the password as we will need it later. It is highly recommended to give it a very strong password. - Download your Distribution provisioning profile from the Member Center
- Rename the provisioning profile to
Release.mobilprovision
- At the top of the script you may need to adjust a few values:
SCHEME="" # Your scheme
KEYCHAIN="$SCHEME.keychain"
PROVISIONING_PROFILE="$SCRIPT_DIR/Release.mobileprovision"
INFO_PLIST="$SCHEME/Info.plist"
APP_ID="" # something like 123456 find it in itunesconnect.apple.com
export ITUNES_CONNECT_ACCOUNT="" # the user used for deployment
NOTE: You may need to adjust the test script, if you are using a Xcode workspace.
- On your CI server set the following Environment variables:
ITUNES_CONNECT_PASSWORD # The password of the Apple ID for your upload user
KEYCHAIN_PASSWORD # a random password which will be used during deployment
KEY_PASSWORD # The password for your private key
Now if you push to production
it will automatically test, build and upload your iOS App.