How to Re-Sign the Ipa File

Resign IPA from development to enterprise

It is possible to resign the ipa after it is built.

  1. Terminal way - You can try this. https://coderwall.com/p/cea3fw/resign-ipa-with-new-distribution-certificate

  2. Tool - https://github.com/xndrs/XReSign - A wonderful tool to resign the IPA.

IOS - How to resign an ipa file?

I have found a solution: I have used IReSign to resign .ipa file. The correct entitlements.plist file is this:






application-identifier
{team-identifier}.{bundleId}
aps-environment
production
com.apple.developer.team-identifier
{team-identifier}
get-task-allow

keychain-access-groups

{team-identifier}.{bundleId}


Re-sign IPA (iPhone)

Finally got this working!

Tested with a IPA signed with cert1 for app store submission with no devices added in the provisioning profile. Results in a new IPA signed with a enterprise account and a mobile provisioning profile for in house deployment (the mobile provisioning profile gets embedded to the IPA).

Solution:

Unzip the IPA

unzip Application.ipa

Remove old CodeSignature

rm -r "Payload/Application.app/_CodeSignature" "Payload/Application.app/CodeResources" 2> /dev/null | true

Replace embedded mobile provisioning profile

cp "MyEnterprise.mobileprovision" "Payload/Application.app/embedded.mobileprovision"

Re-sign

/usr/bin/codesign -f -s "iPhone Distribution: Certificate Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"

Re-package

zip -qr "Application.resigned.ipa" Payload

Edit: Removed the Entitlement part (see alleys comment, thanks)

re-sign IPA files

Try this software. It was working fine for me for re-signing IPA with enterprise certificates.

https://github.com/maciekish/iReSign



Related Topics



Leave a reply



Submit