Created
June 13, 2019 12:55
-
-
Save arashkashi/653f46cfa69a4d9750d7c427fe36b181 to your computer and use it in GitHub Desktop.
Xcode build script for provisioning profile
This file contains 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/bash | |
TARGET="Your App" | |
CONFIGURATION="Release" | |
SDK="iphoneos" | |
PROFILE_PATH="/Users/jkp/Desktop/foo.mobileprovision" | |
IDENTITY="iPhone Distribution: Your Company Ltd" | |
KEYCHAIN="/Users/jkp/Desktop/keychain" | |
PASSWORD="foobar" | |
open "${PROFILE_PATH}" | |
sleep 5 | |
osascript -e "tell application \"Xcode\" to quit" | |
security unlock-keychain -p ${PASSWORD} ${KEYCHAIN} | |
xcodebuild \ | |
-target "${TARGET}" \ | |
-configuration ${CONFIGURATION} \ | |
-sdk iphoneos \ | |
CODE_SIGN_IDENTITY="${IDENTITY}" \ | |
OTHER_CODE_SIGN_FLAGS="--keychain ${KEYCHAIN}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From https://stackoverflow.com/questions/866761/setting-a-provisioning-profile-from-within-xcodebuild-when-making-iphone-apps