Generating push notification certificates
Production vs development certificates
First things first, you have to decide whether you are creating a production or development certificate:
- Production certificates will deliver push notifications to devices installed via TestFlight or App Store
- Development certificates will deliver push notifications to devices that have an Xcode-built version
Be aware that on certain providers (like Azure) you can only upload one kind of certificate per environment.
Generate a request
With keychain access:
- Click Keychain Access / Certificate Assistant / Request a Certificate from Certificate Authority...
- Fill out your email and a name. Leave CA name empty.
- Save the file to disk
Create the certificate
- Go to Apple Developer / Certificates, Identifiers, Profiles / App IDs (found here)
- Select the appropriate App ID and click Edit at the bottom. If the Edit button is disabled the you might not have the proper permissions set up.
- Follow the directions to upload your certificate request
- Generate and download the certificate
Create a p12 file
You will need to upload a p12 file to whatever push notification provider you are using. To generate this:
- Double click the *.cer file you have just generated; this will add it to your Keychain (via Keychain Access)
- Open Keychain Access and find the *.cer file. Right click and select Export...
- Choose p12 as the file format and select a location
- If your provider allows (or requires) a password, fill out a unique, preferably generated password here
- Save and upload the file to your provider