Create Distribution Certificate and Resign Development IPA
This guide outlines the steps to create the enterprise distribution profile and certificate and re-sign the IPA that was created for a different method of distribution (development/ad-hoc). It also lists the manual steps to resign the IPA using the enterprise certificate and provisioning profile, and to change the bundle ID of the app.
If you have your enterprise account but don't want to share the Distribution Certificate and Provisioning Profile with the Point of Sale team, you can request a PS dev IPA and re-sign it with your Distribution certificate and profile before distributing the Point of Sale app via your MDM.
- Create the app ID in the Apple Developer Enterprise account. For example,
com.appName.prod.ios. - Create an In-House Production Certificate and share the certificate and private key. This can also be an existing certificate used for other apps. Export the distribution certificate, which is required to resign the IPA
- Create an In-House Provisioning Profile for the newly created app ID signed with the Production certificate. Export the Provisioning profile, which is required to resign the IPA
- To enable notifications, create an Apple Push Notification service SSL (Sandbox & Production) certificate and export the .p12 file along with the password used to sign. Provide it to the Point of Sale team for upload to AWS.
Each Enterprise Account has a uniquely registered bundle ID for the app, provisioning profile for enterprise distribution along with the certificate. Use these steps in terminal to resign a development IPA to enterprise IPA by signing with the new distribution certificate and profile.
- Navigate to the IPA and unzip the file.
unzip AppName.ipa
If asked to replace Payload/PSStore.app/\*, provide None as the response to skip this step.
- Remove the existing code signing.
rm -rf Payload/AppName.app/_CodeSignature/
- Navigate to the PlistBuddy directory and update the bundle ID.
/usr/libexec/PlistBuddy Payload/AppName.app/Info.plist
PlistBuddy is a tool provided by Apple to perform operations on a plist file using bash commands. You can add, edit, and delete any values in a plist file using PlistBuddy.
From PlistBuddy, enter these commands.
- Switch the profile.
- Sign the app with the new distribution certificate.
codesign -f -s "Apple Distribution Certificate Name" Payload/AppName.app
6. Rezip the IPA after resigning.
zip -qr AppName-resigned.ipa Payload/