Hossam Eldin
Hossam Eldin

Reputation: 117

How can I edit Root.Plist inside a generated .ipa archive?

The case is as follow , I have developed an iphone application and want to brand it without giving the source code for the client (whom by themselves refuses to give me the credentials for their developer accounts) , so I was thinking , is their any way to give them the .ipa file and enable them to change a couple of images and the Setting.bundle , re-codesign it and submit it on thier own ??

Upvotes: 1

Views: 4835

Answers (1)

Hossam Eldin
Hossam Eldin

Reputation: 117

It was solved as follow,

  1. Rename the ".ipa" file to a .zip and extract it
  2. Go to Payload/{your app}.app , right click on it and show package content if you are running MacOSX , windows will see it as folder
  3. change what you want from images and Settings.bundle ...etc.
  4. Resign the code through the shell as indicated in the attached .sh file

    #!/bin/sh 
    
    #Given that the application name is MyApplication.ipa
    export ARCHIVE_NAME="MyApplication"
    #As indicated in the keychain certifcate common name
    export CERTFICATE_NAME="MyCertificate"
    rm -rf ./Payload
    echo "$ARCHIVE_NAME"".ipa" "$ARCHIVE_NAME"".backup"
    unzip "$ARCHIVE_NAME"".ipa"
    codesign -f -s "$CERTFICATE_NAME"  ./Payload/"The package name in the Payload folder with the extension"
    zip -r ./"$ARCHIVE_NAME"".zip" ./Payload
    cp "$ARCHIVE_NAME"".ipa" "$ARCHIVE_NAME"".backup"
    mv "$ARCHIVE_NAME"".zip" "$ARCHIVE_NAME"".ipa"
    rm -rf ./Payload
    echo "Finished Code Sign successfully"
    

The tricky part was , how to upload the archive once again to the store ? A tool offered by apple through the itunes-connect account should be used to upload that archive independent from Xcode. it could be found as follow itunes-connect -> login -> manage your application , the second left bottom tab is for the application loader "Hidden in a smart way , Apple is Apple :)"

Upvotes: 4

Related Questions