Skip to content

Instantly share code, notes, and snippets.

@mikesorae
Last active December 31, 2015 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesorae/8037891 to your computer and use it in GitHub Desktop.
Save mikesorae/8037891 to your computer and use it in GitHub Desktop.
Xcode make file
# Build Settings
BUILD_PATH=build
CONFIGURE=Release
SCHEME=xxxxxxx
TARGET=xxxxxxx
# Settings for Sigining
PROVISION_NAME=xxxxxxx
CODE_SIGN="iPhone Distribution: xxxxxxx"
# Get UUID from provisioning profile
PROVISION_UUID=`cat ${PROVISION_NAME}.mobileprovision | grep -A 1 -a UUID | grep "string" | sed -E "s/.*>([^<]*)<.*/\1/g"`
default:
@echo default
adhoc:
@echo adhoc
if [ -a ${BUILD_PATH} ]; then rm -R ${BUILD_PATH}; fi;
xcodebuild \
-sdk iphoneos7.0 \
-scheme ${SCHEME} \
-target ${TARGET} \
-configuration ${CONFIGURE} \
install \
CODE_SIGN_IDENTITY=${CODE_SIGN} \
PROVISIONING_PROFILE=${PROVISION_UUID} \
DSTROOT=${BUILD_PATH}
xcrun -sdk iphoneos \
PackageApplication ${PWD}/build/Applications/${TARGET}.app \
-o ${PWD}/${BUILD_PATH}/${TARGET}.ipa \
--embed ${PROVISION_NAME}.mobileprovision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment