Code Signing For iOS
Learn how to code sign your iOS applications.
Code signing
Before we can publish apps to the Apple App and Google Play stores, they must be digitally signed with a valid certificate.
This ensures that the app can be “trusted” by end-users, as the signing certificate(s) prove the app originates from a known source and hasn’t been modified by any party other than the developer.
Code signing is implemented differently on iOS and Android platforms, though.
Throughout this lesson, we’ll take you through how to sign an application for iOS, which is the most lengthy and complex to implement.
Code signing an iOS application
There are a few steps involved here:
- Creating a Certificate Signing Request (CSR) file.
- Generating development and distribution certificates.
- Adding Devices and App IDs.
- Generating provisioning profiles.
We’ll start by creating a Certificate Signing Request (CSR) file, which will provide encrypted information to be used within the App Store Development and Distribution Certificates that are used to code sign iOS apps.
Creating a Certificate Signing Request file
Open the Keychain Access utility on your Mac (located in Applications/Utilities/
), and from the Keychain Access menu, select “Preferences”. In the dialog window that appears, select the “Certificates” tab and ensure the following options are set to “Off”:
- Online Certificate Status Protocol (OCSP)
- Certificate Revocation List (CRL)
Now we need to request a Certificate from a Certificate Authority, as demonstrated below:
The Certificate Assistant window will be displayed to help guide you through the process of generating the Certificate Request.
In this window, complete the following fields:
- User Email Address
- Common Name
- CA Email Address
Select “Saved to disk” from the radio buttons options and select the checkbox for the “Let me specify key pair information” option:
Click “Continue” and select a location on your computer to save the Certificate Signing Request file to:
Once this has been signed, you’ll be prompted to select a key size and algorithm for the digital certificate’s key pair.
- Key size should be 2048 bits.
- Algorithm should be RSA.
Click “Continue” and the Certificate Signing Request file will be saved ...