Introduction
A distribution certificate is a digital certificate that can be used to sign code (e.g., .p12
). It is used to sign your app before you submit it to the App Store.
Prerequisites
- Apple Developer Account: Ensure that you have an Apple Developer account. If you don’t have one, you need to sign up on the Apple Developer website.
- The iOS App ID: Ensure that you have an iOS App ID. If you don’t have one, follow the creating the ios app id blog for more detail.
Certificate Types
There are two types of certificates:
-
Development Certificate: A development certificate is used to sign code for testing on your own devices. It allows the developer to build and install apps on physical devices for testing.
- iOS App Development: Sign development versions of your iOS app.
- Apple Development: Sign development versions of your iOS, iPadOS, macOS, tvOS, watchOS, and visionOS apps.
-
Distribution Certificate: A distribution certificate is used to sign code for distribution on the App Store. It allows you to sign and distribute apps to users’ devices.
- iOS Distribution (App Store and Ad Hoc): Sign your iOS app for submission to the App Store or for Ad Hoc distribution.
- Apple Distribution: Sign your iOS, iPadOS, macOS, tvOS, watchOS, and visionOS apps for release testing using Ad Hoc distribution or for submission to the App Store.
Steps to Create a Distribution Certificate
- Open Keychain Access.
- Choose
Certificate Assistant
thenRequest a Certificate From a Certificate Authority
. - Enter your email address and name. Check
Saved to disk
and continue. Save the file to your computer. - Login to your Apple Developer account.
- Click
Certificate
on theCertificates, Identifiers & Profiles
tab. - Click on the
+
button to create a new certificate. - Select the certificate type you want. For example: if you want to submit your iOS app to the App Store, choose
iOS Distribution (App Store and Ad Hoc)
and click onContinue
. - Upload the
*.certSigningRequest
file you created in the previous step and click onContinue
. - Download the certificate and double-click the
.cer
file to install it in Keychain Access.
How to Export a Distribution Certificate as a .p12 File
- Open Keychain Access.
- Select the certificate you want to export.
- Right-click on the certificate and select
Export
.
Conclusion
In this blog post, we learned how to create a distribution certificate. In the next blog post, we’ll learn how to create a new provisioning profile.