Skip to content

Instantly share code, notes, and snippets.

@Jxrgxn
Forked from abury/gist:1404051
Created June 30, 2016 20:45
Show Gist options
  • Save Jxrgxn/c0ba8cdabf4705f798749d721f2fa172 to your computer and use it in GitHub Desktop.
Save Jxrgxn/c0ba8cdabf4705f798749d721f2fa172 to your computer and use it in GitHub Desktop.
Simple iOS Build Script
#!/bin/sh
# Simple iOS build script
# Written by Aron Bury, 29/11/2011
appname="AwesomeApp"
target_name="$appname"
sdk="iphoneos"
certificate="iPhone Developer: Joe Blogs"
# To use as a fixed script use the first project_dir varirable.
# If you are including it as a build step with Hudson, use the second variable passing in $WORKSPACE as the variable
#project_dir="$HOME/Documents/apps/$appname"
#projet_dir="$1/$appname"
build_location="$HOME/Builds/$appname"
#Create folder location for build files if they dont exist
if [ ! -d "$build_location" ]; then
mkdir -p "$build_location"
fi
cd "$project_dir"
xcodebuild -target "$appname" OBJROOT="$build_location/obj.root" SYMROOT="$build_location/sym.root"
xcrun -sdk iphoneos PackageApplication -v "$build_location/sym.root/Release-iphoneos/$appname.app" -o "$build_location/$appname.ipa" --sign "$certificate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment