Skip to content

Instantly share code, notes, and snippets.

@oboje
Created March 8, 2016 07:30
Show Gist options
  • Save oboje/b7599de836a58f16033c to your computer and use it in GitHub Desktop.
Save oboje/b7599de836a58f16033c to your computer and use it in GitHub Desktop.
resign ipa
Assumptions:
.ipa filename is app.ipa
app is called MyApp
new provisioning profile resides at: ~/Downloads/AdHoc.mobileprovision
distribution certificate name is Company Certificate
may not need resource-rules parameter
provisioning profile is either for Adhoc, or Enterprise distribution
Commands:
unzip app.ipa
rm -rf Payload/MyApp.app/_CodeSignature/
cp ~/Downloads/AdHoc.mobileprovision Payload/MyApp.app/embedded.mobileprovision
codesign -f -s "iPhone Distribution: Company Certificate" --resource-rules Payload/MyApp.app/ResourceRules.plist Payload/MyApp.app
zip -qr app-resigned.ipa Payload/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment