Featured image of post Creating a Distribution Certificate

Creating a Distribution Certificate

iOS App Publishing - Part 3

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 then Request a Certificate From a Certificate Authority. Request a Certificate From a Certificate Authority
  • Enter your email address and name. Check Saved to disk and continue. Save the file to your computer. Enter your email address and name
  • Login to your Apple Developer account.
  • Click Certificate on the Certificates, Identifiers & Profiles tab. Certificates, Identifiers & Profiles
  • 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 on Continue. Certificate type
  • Upload the *.certSigningRequest file you created in the previous step and click on Continue. Upload the *.certSigningRequest file
  • Download the certificate and double-click the .cer file to install it in Keychain Access. Download the certificate

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. 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.

References

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy