Skip to content

Instantly share code, notes, and snippets.

@sharat
Created July 27, 2015 12:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharat/77607240a80644a66480 to your computer and use it in GitHub Desktop.
Save sharat/77607240a80644a66480 to your computer and use it in GitHub Desktop.
create IPK file using xctool (xcrun)
#!/bin/bash
set -x
# codesigning and provisioning profile should be configured using Xcode
PROJECT=<your project name>
SCHEME=${PROJECT} # Setting project name as the default scheme. Update based on your scheme
ARCHIVEPATH=`pwd`/archive
IPA_NAME=${PROJECT}
PROJECT_BUILDDIR=${ARCHIVEPATH}/${IPA_NAME}.xcarchive/Products/Applications
xctool -project ${PROJECT}.xcodeproj -scheme ${SCHEME} archive -archivePath "${ARCHIVEPATH}/${IPA_NAME}"
xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}"/*.app -o "${ARCHIVEPATH}/${IPA_NAME}.ipa"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment