Created
January 11, 2011 04:25
-
-
Save hramos/774017 to your computer and use it in GitHub Desktop.
Build and Archive script from command line. Use with testflight deployment script, or upload .ipa to web server (use iOS Beta Builder to create initial manifest files)
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
MY_USERNAME="username" | |
CONFIGURATION_NAME="Ad Hoc" # Distribution, Ad Hoc... | |
PROJDIR="/path-to-your-xcode-project" | |
APPLICATION_NAME="myapplication" | |
PROJECT_NAME="${APPLICATION_NAME}" # .xcodeproj ommitted | |
TARGET_SDK="iphoneos4.2" # current sdk | |
PROJECT_BUILDDIR="/Users/${MY_USERNAME}/path-to-build-dir/${CONFIGURATION_NAME}-iphoneos" | |
TARGET_TEST_NAME="${APPLICATION_NAME}" | |
BUILD_HISTORY_DIR="${PROJDIR}/distribution/" # write ${APPLICATION_NAME}.IPA here | |
DEVELOPER_NAME="Your Name (Bundle Prefix If Applicable)" # mine was company name | |
PROVISONING_PROFILE="/Users/${MY_USERNAME}/Library/MobileDevice/Provisioning Profiles/#####################.mobileprovision" | |
# compile project | |
echo Building Project | |
cd "${PROJDIR}" | |
xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration "${CONFIGURATION_NAME}" | |
#Check if build succeeded | |
if [ $? != 0 ] | |
then | |
exit 1 | |
fi | |
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${PROJECT_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on http://stackoverflow.com/questions/4559981/how-to-use-automator-to-distribute-beta-applications-for-over-the-air-installati