Search code examples
iosprovisioning-profileipa

Renaming of IPA app name


I have production IPA file with the name as MyApp. I need to change this name as MyApp_SIT for testing purpose. Where I have to do the modifications. I have the production IPA file and the new Provisioning profile and certificate for testing purpose. Is this possible to rename the app name. I have to finish it urgently. Can anyone please tell how to do this.


Solution

  • If you have the provisioning profile, certificate, and key, you can modify the .app payload contents and then re-sign. But given that you do not have the source code, I doubt you have those. If you do, here are the steps:

    From the terminal:

    unzip app.ipa
    
    rm -rf Payload/MyApp.app/_CodeSignature/
    
    /usr/libexec/PlistBuddy Payload/MyApp.app/Info.plist
    

    Inside the PlistBuddy editor, do the following:

    Set :CFBundleName MyApp_SIT
    save
    quit
    

    Then, back at the command line, we resign the app with it's new bundle name:

    cp <path_to_provisioing_profile>/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/
    

    General steps referenced here:

    https://coderwall.com/p/qwqpnw/resign-ipa-with-new-cfbundleidentifier-and-certificate