Skip to content

Instantly share code, notes, and snippets.

@chaitanyagupta
Last active November 5, 2024 10:25
Show Gist options
  • Save chaitanyagupta/9a2a13f0a3e6755192f7 to your computer and use it in GitHub Desktop.
Save chaitanyagupta/9a2a13f0a3e6755192f7 to your computer and use it in GitHub Desktop.

Revisions

  1. chaitanyagupta revised this gist Oct 4, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions re-sign-ios-app.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    **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. chaitanyagupta revised this gist Sep 12, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions re-sign-ios-app.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ Ensure that the new distribution certificate is in your keychain and the new pro
    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 :/tmp/entitlements.plist /path/to/<app-name>.app/
    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/<app-name.app>/Info.plist`.
    @@ -20,7 +20,7 @@ Ensure that the new distribution certificate is in your keychain and the new pro

    6. Install the new signature.

    codesign -f -s "Distribution Certificate Name" -i com.example.new_bundle_id --entitlements /tmp/entitlements.plist -vv /path/to/<app-name>.app/
    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

  3. chaitanyagupta renamed this gist Sep 10, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. chaitanyagupta renamed this gist Sep 10, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. chaitanyagupta revised this gist Sep 10, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ Ensure that the new distribution certificate is in your keychain and the new pro
    codesign -d --entitlements :/tmp/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. It can be found at `/path/to/<app-name.app>/Info.plist`.
    4. Open `Info.plist` in your favourite editor and modify the bundle identifier (`CFBundleIdentifier`). It can be found at `/path/to/<app-name.app>/Info.plist`.
    5. Replace the embedded provisioning profile.

    cp /path/to/new-profile.mobileprovision /path/to/<app-name>.app/embedded.mobileprovision
  6. chaitanyagupta revised this gist Sep 10, 2014. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -18,4 +18,12 @@ Ensure that the new distribution certificate is in your keychain and the new pro

    cp /path/to/new-profile.mobileprovision /path/to/<app-name>.app/embedded.mobileprovision

    6. Install the new signature
    6. Install the new signature.

    codesign -f -s "Distribution Certificate Name" -i com.example.new_bundle_id --entitlements /tmp/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.
  7. chaitanyagupta revised this gist Sep 10, 2014. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -3,13 +3,19 @@ To re-sign an iOS app with another developer account, ensure that the following
    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. So if you have an app with bundle id "com.example.app" from a dev account, you can't re-use the same bundle ID in another dev account (even though the team id/prefix would be different).
    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 :/tmp/entitlements.plist Payload/<app-name>.app/
    codesign -d --entitlements :/tmp/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.
    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. It can be found at `/path/to/<app-name.app>/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
  8. chaitanyagupta revised this gist Sep 10, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,6 @@ Ensure that the new distribution certificate is in your keychain and the new pro
    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 :/tmp/entitlements.plist Payload/<app-name>.app/
    codesign -d --entitlements :/tmp/entitlements.plist Payload/<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.
  9. chaitanyagupta revised this gist Sep 10, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,5 @@ Ensure that the new distribution certificate is in your keychain and the new pro

    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 :/tmp/entitlements.plist Payload/<app-name>.app/
  10. chaitanyagupta revised this gist Sep 10, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,5 @@ Note that the Apple requires bundle IDs to be globally unique. So if you have an
    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 the entitlements.plist from the app
    2. Export entitlements.plist from the app using the `codesign` utility
    codesign -d --entitlements :/tmp/entitlements.plist Payload/<app-name>.app/
  11. chaitanyagupta revised this gist Sep 10, 2014. No changes.
  12. chaitanyagupta created this gist Sep 10, 2014.
    11 changes: 11 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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. So if you have an app with bundle id "com.example.app" from a dev account, you can't re-use the same bundle ID in another dev 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 the entitlements.plist from the app