undefined

How to generate APNS certificate

Create App ID

Each iOS application that uses the APNs must have a unique application ID that uniquely identifies your app. The following steps describe how to create an Apple App ID for your application.

If you already have an App ID, you can skip these steps.

  1. Once you have signed in to the iPhone Developer Connection Portal, click on Certificates, IDs & Profiles. iPhone Developer Connection Portal

  2. On the next screen, select Identifiers > App IDs in the left sidebar and then click on the plus button in the top right corner iPhone Developer Connection Portal, Certificates, IDs & Profiles

  3. Enter your app name for the App ID Description section (1). In the App ID Suffix section, select the Explicit App ID option and enter Bundle Identifier(2).

    For example, our iOS application ID looks like com.awesomecorp.messagingspace:

    iPhone Developer Connection Portal, new App ID

    Note: Ensure you have created an App ID without a wildcard(make sure it doesn’t have an asterisk in it). Wildcard IDs cannot use the push notification service.

  4. Once you have entered all of the information, scroll down to the bottom of the page and select Continue button.

You will now be presented with an overview of your new app ID. Click Register button to continue.

Generate a Certificate Signing Request

You need to generate a certificate signing request file so that you can use it to request an APNS SSL certificate later on.

Follow the instructions below to create one:

  1. Launch the Keychain Access application in your macOS: macOS Keychain access

  2. Select Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority: Request a Certificate From a Certificate Authority

  3. Enter the required information and check the 'Saved to disk' option. Click Continue: Form a CSR request

  4. Save the certificate request using the suggested name and click Save. Click Done in the next screen: Save CSR file on disk

Create universal APNS certificate

  1. On the Certificates, IDs & Profiles screen, select Certificates > All in the left sidebar and then click on the plus button in the top right corner: Create new certificate

  2. The Add iOS Certificate screen will appear. Choose Apple Push Notifications service SSL (Sandbox & Production) and click Continue: Create new universal APNS certificate

    Here we will create a single universal push certificate which is good for both Development and Production environments.

  3. On the next screen choose an App ID you want to create a push certificate for. Then click Continue: Choose App ID for new push certificate

  4. On the next screen About Creating a Certificate Signing Request (CSR) click Continue: About to upload CSR

  5. Click 'Choose File...' button to locate Certificate Request File that you have saved earlier. Click Generate: Upload CSR file and generate push certificate

  6. Your APNS SSL Certificate will now be generated. Click Download and save it to your hard disk: Download

Also, you can download your new certificate on App ID details page: Download APNS certificate from App ID details page

Create p12 file

  1. Once your certificate has been created, open the file with Keychain Access app on your computer. If you are asked which keychain to add the certificate to, select login option. SSL certificate will be used by provider(ConnectyCube) application so that it can contact the APNs to send push notifications to your applications.

  2. Still in Keychain Access app, select Certificates option in the bottom section of the left sidebar. You will now need to find the certificate you just made; it will have the name Apple Push Services: < Bundle ID > and paired with a private key. APNS certificate in Keychain Access

  3. Right-click on this key and select Export "Apple Push Services ..." option. In the popup that appears, you can call the file whatever you want, but make sure that File Format is set to Personal Information Exchange (.p12).

When exporting the certificate, you can provide a password for the p12 file.

That's all - now you have a ready-to-go APNS certificate which can be used on both Development and Production environments of your iOS application.

Upload certificate to Dashboard

To upload APNS certificate to ConnectyCube Dashboard you need to do the following:

  1. Open your ConnectyCube server Dashboard at admin< server >.connectycube.com
  2. Go to Push notifications module
  3. Switch to Settings tab
  4. Upload the newly created APNS certificate on Apple Push Notification Service (APNS) form.

Choose certificate and enter password if needed.

After this you will be able to start using push notifications in your iOS application.