Skip to content

Instantly share code, notes, and snippets.

Last active January 18, 2023 10:19
  • Star 72 You must be signed in to star a gist
  • Fork 19 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to re-sign an iOS app with another developer account

WARNING These steps are probably out dated and will not work.

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

  1. Unzip the .ipa. This will usually unzip to Payload/<app-name>.app/

  2. Export entitlements.plist from the app using the codesign utility

     codesign -d --entitlements :entitlements.plist /path/to/<app-name>.app/
  3. Open entitlements.plist in your favourite editor, and modify the bundle id and prefix to that of the new dev account and app. Don't forget to update the keychain access groups.

  4. Open Info.plist in your favourite editor and modify the bundle identifier (CFBundleIdentifier). It can be found at /path/to/<>/Info.plist.

  5. Replace the embedded provisioning profile.

     cp /path/to/new-profile.mobileprovision /path/to/<app-name>.app/embedded.mobileprovision
  6. Install the new signature.

     codesign -f -s "Distribution Certificate Name" -i com.example.new_bundle_id --entitlements entitlements.plist -vv /path/to/<app-name>.app/
  7. Package the application

     xcrun -sdk iphoneos PackageApplication -s "Distribution Certificate Name" -o /path/to/new.ipa /path/to/<app-name>.app
  8. Distribute /path/to/new.ipa to your testers.

Copy link

This didn't work for me, I tried to submit the resigned app with another distro cert/profile and it complained about the app needed to be signed with the original profile.

screen shot 2015-08-21 at 4 45 29 pm

Copy link

If you're still having troubles with codesigning your iOS app, I strongly recommend you to check out AirSignApp (

Copy link

I've followed these excellent steps and am close but I'm getting the error "mapped file does not the same team identifier as main process" for my frameworks Alamofire, etc. Looking closer I can see that have the old identifier. How do I change the frameworks to have the same identifier ?

Copy link

Framework has to be signed along with the app if you are going to use different signer

codesign -f -s "Distribution Certificate Name" .app/Frameworks/*

then sign the app again

codesign -f -s "Distribution Certificate Name" .app

Copy link

When resigning app by changing it's bundle ID the services which we have been registered using the bundleID like notification services won't work anymore. Is there anyway to resign the application with another account without changing provision profile?

Copy link

irodkin commented Nov 1, 2017

@niloufarMakhzani You can use 'codesign -s' command without specifying '-i' option. (Execute 'codesign --help' for details.)

Copy link

Great list.

any suggestions for Step 7, now that PackageApplication has been deprecated for 1y + ?

Copy link

Can I resign a distribution signed IPA with a development certificate? My app crashe constantly at launch time. I don't get it...

Copy link

vorlovsky commented Jan 18, 2023

Step 7 can be skipped (at least since PackageApplication is deprecated), just zip up your Payload folder:
zip -r /path/to/new.ipa /path/to/Payload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment