Introduction:
We often have a requirement where we need an iOS application to be uploaded on private App Store networks such as In-House Enterprise Distribution. Before exporting the IPA for these programs we need to ensure we have following files and information:
- Bundle Identifier (ex. com.bostonbyte.xxx) - Information
- Certificate with private key file (.p12 format) with password (if any) - File
- Mobile Provisioning Profile against the Certificate above - File
Note: All steps mentioned here to export the IPA file for an iOS application is only limited to Mac OS (machines).
Procedure:
- Install the certificate (.p12) file on the machine from which we need to export the IPA using the keychain utility.
- Install the mobile provisioning profile on the same machine in Xcode.
- Enter the Bundle ID provided in the project against which the IPA has to be exported
XCode => Project Properties => General => Bundle Identifier - Set Code Signing (Certificate) and mobile provisioning under XCode => Project Properties => Build
- Select Product option from Xcode project and click Archive
- After completion of archive, organizer window will open which will show latest archived file on top of the list.
- Right click the archived file in organizer, click Show in Finder
- Locate the .xcarchive file in finder window and get the absolute path for .xcarchive file
- Use the command below to export the IPA from .xcarchive:
xcodebuild -exportArchive -archivePath <absolute_path_of_xcarchive_file> -exportPath <absolute_path_to_save_ipa> -exportFormat ipa -exportProvisioningProfile <name_of_mobile_provisioning_profile> - After generating the command with required replacements, open the terminal on the machine and paste the command. This will export the IPA file to specified export path.
- We are now able to use this IPA file and send across to our client who can upload the IPA on the In-House Enterprise Distribution program.