Push Notifications in Native iOS Applicationsimprove 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.p12sandbox certificate file.
- During a production phase, use the
apns-certificate-production.p12production 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)
- Create a MobileFirst project and add a MobileFirst iOS Native API.
- Place the Apple APNS certificate file at the root of the application folder.
application-descriptor.xml, add the
pushSenderelement under the nativeIOSApp environment. These settings are also editable with the Application Descriptor Editor in Design mode.
- Replace the
passwordvalue with the .p12 certificate password.
- Replace the
bundleIdvalue with your application
bundleIdvalue. Consult the Apple documentation about how to create a
bundleIdfor Xcode projects.
- Replace the
- Deploy the MobileFirst native API:
mfp deployfrom 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:
- Event Source Notifications in Native iOS Applications
- Interactive and Silent Notifications in Native iOS Applications
- Tag and Broadcast Notifications in Native iOS Applications
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.