Push Notifications in Native iOS Applications

improve this page | report issue


This tutorial explains how to configure a MobileFirst native iOS application to support push notifications.
Also mentioned are the addresses and ports that must be accessible for notifications to arrive to the supported Apple Push Notification Service vendor (APNS).

Prerequisite: Make sure to read the Configuring a native iOS application with the MobileFirst Platform SDK tutorial first.

This tutorial covers the following topics:

Setting up push notifications

To send push notifications to iOS devices, use the Apple Push Notifications Service (APNS).
You must be a registered Apple iOS Developer to obtain an APNS certificate for your application.
Note: APNS certificates must have a non-blank password.

  • During the development phase, use the apns-certificate-sandbox.p12 sandbox certificate file.
  • During a production phase, use the apns-certificate-production.p12 production certificate file.

To learn about setting up the certificates that are required for push notifications, see this blog post: Understanding and setting up certificates required to use iOS devices and Apple Push Notifications services (APNS)


  1. Create a MobileFirst project and add a MobileFirst iOS Native API.
  2. Place the Apple APNS certificate file at the root of the application folder.
  3. In application-descriptor.xml, add the pushSender element under the nativeIOSApp environment. These settings are also editable with the Application Descriptor Editor in Design mode.
    • Replace the password value with the .p12 certificate password.
    • Replace the bundleId value with your application bundleId value. Consult the Apple documentation about how to create a bundleId for Xcode projects.
    • For example:

      <nativeIOSApp id="AppName" bundleId="com.REPLACE-WITH-BUNDLE-ID" platformVersion=""
      	version="1.0" xmlns="http://www.worklight.com/native-ios-descriptor">
      	<pushSender password="REPLACE-WITH-CERTIFICATE-PASSWORD"/>
  4. Deploy the MobileFirst native API:


    Use mfp deploy from within the application folder.


    Right-click the Native API folder and select Run As > Deploy Native API.

Apple Push Notifications Service

For push notifications to be sent, the following servers must be accessible from a MobileFirst Server instance:
Sandbox servers:

Production servers:

1-courier.push.apple.com 5223

Notification types

Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on November 09, 2016