To set up push notifications for iOS devices, you must
use the Apple Push Notification Service (APNS). To use APNS, you must
be a registered Apple iOS Developer and obtain an Apple APNS certificate
for your application.
Before you begin
Ensure that the following servers are accessible from
MobileFirst Server:
- Sandbox servers:
- gateway.sandbox.push.apple.com:2195
- feedback.sandbox.push.apple.com:2196
- Production servers:
- gateway.push.apple.com:2195
- feedback.push.apple.com:2196
Procedure
- Follow the required steps to obtain your APNS certificate
and password. For more information, see the developerWorks® article Understanding and setting up artifacts required to
use iOS devices and APNS in a development environment.
- Choose either of the following:
- For a Hybrid app, place the Apple APNS certificate file at
the root of the application folder, along with the application-descriptor.xml file.
- For a Cordova app, place the .p12 file
in the root of the Cordova project, along with the Cordova app config.xml file.
- Install the Entrust CA root certificate by using SSL port
443.
While you work in development mode, rename your
certificate file to
apns-certificate-sandbox.p12.
When you move to production, rename your certificate file to
apns-certificate-production.p12.
In both cases, place the certificate file in the environment root
folder or in the application root folder. When the hybrid application
has both iPhone and iPad environments, separate certificates are necessary
for push notification. In that case, place those certificates in the
corresponding environment folders.
Note: The environment root folder
takes the highest priority.
For more information, see
the iOS Developer Library.
- In the application-descriptor.xml file,
for <iPhone> set the following attributes
for the <pushSender> element:
Attribute |
Description |
password |
The APNS certificate password received from Apple. |
Results
Your push notification setup is now complete.