Skip to content

Instantly share code, notes, and snippets.

@romualdr
Forked from skhatri/xbuild.sh
Last active December 16, 2015 08:53
Show Gist options
  • Save romualdr/df724e11e9a9f606f9b6 to your computer and use it in GitHub Desktop.
Save romualdr/df724e11e9a9f606f9b6 to your computer and use it in GitHub Desktop.
XCode command line build to create IPA file.
#$1 = scheme name. usually project name.
export ARCHIVE_PATH=/usr/home/source/archives
rm -rf $ARCHIVE_PATH/$1*
rm -rf build
mkdir build
# Let's asume the xcarchive already exists
# xcodebuild -scheme $1 archive -archivePath $ARCHIVE_PATH/$1.xcarchive
# cd $ARCHIVE_PATH/$1.xcarchive/
# # Read Info.plist
# # Retrieve Provisioning profile
xcodebuild -exportArchive -exportFormat IPA -exportPath "build/$1.ipa" -archivePath "$ARCHIVE_PATH/$1.xcarchive" -exportProvisioningProfile "iOS Team Provisioning Profile: *"
#1. use testflight
#2. open using itunes to sync it up to the client device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment