Skip to content

Instantly share code, notes, and snippets.

@brianantonelli
Created November 2, 2012 02:39
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 brianantonelli/3998351 to your computer and use it in GitHub Desktop.
Save brianantonelli/3998351 to your computer and use it in GitHub Desktop.
Resign an IPA
#! /bin/sh
echo "Drag IPA file here: "
read -e IPA
unzip $IPA
rm -r "Payload/AutoTrader.app/_CodeSignature" "Payload/AutoTrader.app/CodeResources"2> /dev/null | true
echo "Drag AutoTrader (Non-Distribution) Provisioning Profile here: "
read -e PROV
cp "$PROV""Payload/AutoTrader.app/embedded.mobileprovision"
/usr/bin/codesign -f -s "iPhone Developer" --resource-rules "Payload/AutoTrader.app/ResourceRules.plist" "Payload/AutoTrader.app"
DEST="AutoTrader.resigned.ipa"
zip -qr $DEST Payload
echo Resigned IPA and saved to: ./$DEST
rm -rf Payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment