How to Create an iOS App Store Distribution Certificate
To distribute an iOS app via TestFlight, you need an App Store distribution certificate.
This page explains how to create an App Store distribution certificate using your Apple Developer Program account.
To generate a distribution certificate, you must be enrolled in the paid Apple Developer Program. For more details, see About the Apple Developer Program.
Generate a CSR (Certificate Signing Request) on Mac
First, generate a CSR (Certificate Signing Request) on the Mac that will upload your iOS app to the App Store via Xcode.
Open Keychain Access using Spotlight (⌘ command + space).
Once Keychain Access is open, select “login” under Keychains in the top left, choose the “Certificates” tab, and select “Apple Worldwide Developer Relations Certification Authority.”
With that selected, go to the menu and choose [Keychain Access] > [Certificate Assistant] > [Request a Certificate From a Certificate Authority].
The Common Name field should auto-fill. For the user's email address, enter your Apple ID email. Select “Saved to disk,” then click [Continue].
Specify the save location for the CSR file, save it, and click [Done]. The CSR has now been created.
Create an App Store Distribution Certificate
Next, create the App Store distribution certificate.
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), then click [Continue].
Click [Choose File], select the CSR file you just created, and then click [Continue].
The App Store distribution certificate will now be generated. Click [Download] to download the certificate.
Install the App Store Distribution Certificate on Mac
Install the App Store distribution certificate on the Mac you will use with Xcode to upload your iOS app to the App Store.
Double-click the downloaded .cer file.
Keychain Access will open, and the certificate will be installed.
That's it! You've now created and installed an App Store distribution certificate.