Imagine you want to change the provisioning profile of an application IPA. but you don’t have the source code.
Here is how to proceed :
An IPA file is simply a zip file containing the compiled application components.
- First rename your “YourApplicationName.ipa” file to “YourApplicationName.zip”.
- When you unzip it You will have as an output a directory called “Payload”.
- Then you will find a package with your application name.
- Remove the directory called “_CodeSignature”.
- Rename your provision to “embedded.mobileprovision” and replace the existing one in “Payload/MyApp.app/”.
- Then by editing the “Info.plist” file you can change the application bundle identifier.
- And finally use the “codesign” command to resign your application as the following : codesign -f -s “IDENTITY” Payload/YourApplicationName.app
Note that you can get your current identities list using “security find-identity” in the terminal.