What is APNS ?

Apple Push Notification Service (commonly referred to as Apple Notification Service or APNs) is a platform notification service created by Apple Inc. that enables third party application developers to send notification data to applications installed on Apple devices. The notification information sent can include badges, sounds, newsstand updates, or custom text alerts.

There are three main tasks that must be performed in order to send and receive a push notification:

  • The app must be configured properly and registered with the Apple Push Notification Service (APNS) to receive push notifications upon every start-up.
  • A server must send a push notification to APNS directed to one or more specific devices.
  • The app must receive the push notification; it can then perform tasks or handle user actions using callbacks in the application delegate.

The step-by-step integration process has been described in detail in the coming sections.

  1. Creating the SSL certificate
  2. Creating an App ID
  3. Configuring your App ID for Push Notifications – Development Mode
  4. Configuring your App for Push Notifications – Distribution Mode

The first step is to create an App ID and the associated SSL certificate on the Apple Developer website. This certificate (.p12) will allow the mTraction Platform server to send push notifications to the application identified by the App ID.

1. Creating the SSL certificate

To begin, we’ll need a certificate signing request file. This will be used to authenticate the creation of the SSL certificate.

  1. Launch the Keychain Access application on your Mac.
  2. Select the menu item Keychain Access>>Certificate Assistant>>Request a Certificate From a Certificate Authority
  3. Enter your email address and name.
  4. Select “Saved to disk” to download the .certSigningRequest file to your desktop.

2. Creating an App ID

Every iOS application installed on your developer device needs an App ID. As a convention, these are represented by reversed addresses (ex. com.example.demoPushApp). For this push app, you can use an App ID you’ve already created, but make sure it does not contain a wildcard character (“*”). The following instructions cover the creation of a new App ID.

  1. Navigate to the Apple Developer Member Center website, and select Certificates, Identifiers & Profiles.
  2. Select Identifiers from the iOS Apps section.
  3. You will see a list of your iOS App IDs. Select the “+” button to register a new App Id.
  4. Enter a name for your new App ID, then make sure to select the checkbox next to Push Notifications under App Services.
  5. Choose an App ID Prefix. The default selection should be correct in most cases.
  6. Under App ID Suffix, select Explicit App ID. Enter your iOS app’s Bundle ID. This string should match the Bundle Identifier in your iOS app’s Info.plist.

  7. Select “Continue” and make sure that all the values were entered correctly. Push Notifications should be enabled, and the Identifier field should match your app’s Bundle Identifier (plus App ID Prefix). Select “Submit” to finalize the registration of your new App ID.

3. Configuring your App ID for Push Notifications – Development Mode

Now that you’ve created an App ID (or chosen an existing Explicit App ID), it’s time to configure the App ID for Push Notifications.

  1. Select your newly created App ID from the list of iOS App IDs, then select “Settings”.


  2. Scroll down to the Push Notifications section. Here you will be able to create both a Development SSL Certificate, as well as a Production SSL Certificate. Start by selecting “Create Certificate” under “Development SSL Certificate”.
  3. The next screen will show instructions for creating a Certificate Signing Request (CSR). This is the same .certSigningRequest file you created earlier. Select “Continue”, then select “Choose File…” and locate the .certSigningRequest you created earlier.
  4. Select “Generate”. Once the certificate is ready, select “Done” and download the generated SSL certificate from the “iOS App ID Settings” screen.
  5. Double click on the downloaded SSL certificate to install it in your Keychain.
  6. In Keychain Access, under “My Certificates”, find the certificate you just added. It should be called “Apple Development IOS Push Services: “.

    Right-click on it, select “Export Apple Development IOS Push Services:…”, and save it as a .p12 file. You will be prompted to enter a password which will be used to protect the exported certificate. Do not enter an export password when prompted! Note that you might have to enter your OS X password to allow Keychain Access to export the certificate from your keychain.

    If the Personal Information Exchange (.p12) option is grayed out in the export sheet, make sure “My Certificates” is selected in Keychain Access. If that does not help, double check that your certificate appears under the login keychain. You can drag and drop it into login if needed.
    Note that you’ve just enabled Push Notification for your app in development mode. Prior to releasing your application on the App Store, you will need to repeat steps of this section, but select “Production Push SSL Certificate”, as covered in Next.

4. Configuring your App for Push Notifications – Distribution Mode


  1. You configured your App ID for Push Notifications in Development. select “Production Push SSL Certificate”.
  2. Your App ID should now be configured for both Development and Distribution push notifications. Make sure to download the new Production SSL Certificate from the App ID Settings screen.

  3. Double click on the downloaded SSL certificate to install it in your keychain. Right-click on it and export it as a .p12 file. Again, don’t enter an export password when prompted.