Created
March 23, 2019 15:15
-
-
Save behdaad/4bd8729701d054c72720b5eff0be47df to your computer and use it in GitHub Desktop.
Resign IPA file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPA="/path/to/file.ipa" | |
PROVISION="/path/to/file.mobileprovision" | |
CERTIFICATE="Name of certificate: To sign with" # must be in keychain | |
# unzip the ipa | |
unzip -q "$IPA" | |
# remove the signature | |
rm -rf Payload/*.app/_CodeSignature Payload/*.app/CodeResources | |
# replace the provision | |
cp "$PROVISION" Payload/*.app/embedded.mobileprovision | |
# sign with the new certificate | |
/usr/bin/codesign -f -s "$CERTIFICATE" --resource-rules Payload/*.app/ResourceRules.plist Payload/*.app | |
# zip it back up | |
zip -qr resigned.ipa Payload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment