Skip to content

Instantly share code, notes, and snippets.

@jon
Created February 18, 2010 13:32
Show Gist options
  • Save jon/307651 to your computer and use it in GitHub Desktop.
Save jon/307651 to your computer and use it in GitHub Desktop.
Convenient script to tack on as a "Run Script" action at the end of iPhone build targets.
PACKAGING_DIR="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME-tmp"
rm -rf "$PACKAGING_DIR" || exit 1
mkdir -p "$PACKAGING_DIR/Payload" || exit 1
cp -R "$BUILT_PRODUCTS_DIR/$WRAPPER_NAME" "$PACKAGING_DIR/Payload" || exit 1
$( cd "$PACKAGING_DIR" && ditto -c -k --keepParent --rsrc ./Payload "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.ipa" ) || exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment