How to Create an iOS Distribution Certificate
To distribute an iOS app with Ad Hoc Distribution, you need a distribution certificate specifically for Ad Hoc Distribution.
Here, we'll walk through the process of generating an Ad Hoc Distribution certificate using an Apple Developer Program account.
To generate a distribution certificate for Ad Hoc Distribution, you must be enrolled in the paid Apple Developer Program. For details, see About the Apple Developer Program.
Generate a CSR (Certificate Signing Request) on Mac
First, on the Mac you'll use to generate the .ipa file (the binary file for the iOS app) in Xcode, create a CSR (Certificate Signing Request).
Open Keychain Access using Spotlight search (⌘ command + Space).
In Keychain Access, select login in the default keychain in the upper left, Certificates in the categories at the top, and then select Apple Worldwide Developer Relations Certification Authority from the displayed certificates.
Next, go to the menu and choose [Keychain Access] > [Certificate Assistant] > [Request a Certificate From a Certificate Authority].
Your common name should already be filled in. Enter your Apple ID email address under User Email Address, select Saved to disk, and click [Continue].
Choose a location to save the CSR file, then click [Done]. The CSR file is now created.
Create a Distribution Certificate for Ad Hoc Distribution
Next, generate the distribution certificate for Ad Hoc Distribution.
Log in to the Apple Developer site and click [Certificates] in [Certificates, IDs & Profiles] section.
On the Certificates page, click the + button.
On the Create a New Certificate page, select iOS Distribution (App Store and Ad Hoc) and click [Continue].
Click [Choose File], select the CSR file you created earlier, and then click [Continue].
The Ad Hoc distribution certificate will now be generated. Click [Download] to download the certificate to your Mac.
Install the Ad Hoc Distribution Certificate on Mac
Finally, install the Ad Hoc distribution certificate on the Mac where you'll generate the .ipa file in Xcode.
Double-click the downloaded .cer file.
Keychain Access will open, and the certificate will be installed automatically.
That's it! You have now successfully created and installed an Ad Hoc Distribution certificate for iOS apps.