Skip to content

Instantly share code, notes, and snippets.

@langford
Created January 30, 2015 20:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save langford/68b86eb3ee274f426f35 to your computer and use it in GitHub Desktop.
Save langford/68b86eb3ee274f426f35 to your computer and use it in GitHub Desktop.
Doing IPA builds from the command line because you're tired of the lack of repeatability in Xcode Adhoc builds
#!/bin/sh
# Current as working as of 2014/09/22
# modified form of http://stackoverflow.com/questions/25056144/xcode-6-how-to-pick-signing-certificate-provisioning-profile-for-ad-hoc-distri
# Xcode 6
MYAPP="HELLOWORLD"
OUTPUTDIR="$HOME/Desktop/$MYAPP"
APPNAME="ANAppName"
SCHEME="ASchemeName"
SRCROOT=`pwd`
APP_WORKSPACE="$SRCROOT/WorkSpaceName.xcworkspace"
ARCHIVE_PATH="$OUTPUTDIR/$APPNAME.xcarchive"
rm -f "$OUTPUTDIR/$APPNAME.ipa"
mkdir -p $OUTPUTDIR
xcodebuild -workspace "$APP_WORKSPACE" -scheme "$SCHEME" archive -archivePath "$ARCHIVE_PATH" && xcodebuild -exportArchive -exportFormat ipa -archivePath "$ARCHIVE_PATH" -exportPath "$OUTPUTDIR/$APPNAME.ipa" -exportProvisioningProfile 'Correct Provisioning Profile Name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment