+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Configure the Application Center server for connection to Apple Push Notification Services

Configure your iOS project for Apple Push Notification Services (APNs).


Before you begin

Ensure that the following servers are accessible from Application Center server.

You must be a registered Apple developer to successfully configure your iOS project with Apple Push Notification Services (APNs). In the company, the administrative role responsible for Apple development requests APNs enablement. The response to this request should provide you with an APNs-enabled provisioning profile for our iOS application bundle; that is, a string value that is defined in the configuration page of your Xcode project. This provisioning profile is used to generate a signature certificate file.

Two kinds of provisioning profile exist: development and production profiles, which address development and production environments respectively. Development profiles address Apple development APNs servers exclusively. Production profiles address Apple production APNs servers exclusively. These kinds of servers do not offer the same quality of service.

Note: Devices that are connected to a company wifi behind a firewall are only able to receive push notifications if connection to the following type of address is not blocked by the firewall.

x-courier.sandbox.push.apple.com:5223

Where x is an integer.


Procedure

  1. Obtain the APNs-enabled provisioning profile for the Application Center Xcode project. The result of your administrator's APNs enablement request is shown as a list accessible from https://developer.apple.com/ios/my/bundles/index.action. Each item in the list shows whether or not the profile has APNs capabilities. When we have the profile, you can download and install it in the Application Center client Xcode project directory by double-clicking the profile. The profile is then automatically installed in your keystore and Xcode project.
  2. If we want to test or debug the Application Center on a device by launching it directly from XCode, in the "Xcode Organizer" window, go to the "Provisioning Profiles" section and install the profile on your mobile device.
  3. Create a signature certificate used by the Application Center services to secure communication with the APNs server. This server will use the certificate for purposes of signing each and every push request to the APNs server. This signature certificate is produced from your provisioning profile.

    1. Open the "Keychain Access" utility and click the My Certificates category in the left pane.
    2. Find the certificate we want to install and disclose its contents. You see both a certificate and a private key; for the Application Center, the certificate line contains the Application Center application bundle com.ibm.imf.AppCenter.
    3. Select File > Export Items to select both the certificate and the key and export them as a Personal Information Exchange (.p12) file. This .p12 file contains the private key required when the secure handshaking protocol is involved to communicate with the APNs server.
    4. Copy the .p12 certificate to the computer responsible for running the Application Center services and install it in the appropriate place. Both the certificate file and its password are needed to create the secure tunneling with the APNs server. You also require some information that indicates whether a development certificate or a production certificate is in play. A development provisioning profile produces a development certificate and a production profile gives a production certificate. The Application Center services web application uses JNDI properties to reference this secure data.

      The examples in the table show how the JNDI properties are defined in the server.xml file of the Apache Tomcat server.

      Table 1. JNDI properties
      JNDI Property Type and description Example for Apache Tomcat server
      ibm.appcenter.apns.p12.certificate.location A string value that defines the full path to the .p12 certificate.

        <Environment name="ibm.appcenter.apns.p12.certificate.location" 
        override="false" type="java.lang.String" value=
        "/Users/someUser/someDirectory/apache-tomcat/conf/AppCenter_apns_dev_cert.p12"/>

      ibm.appcenter.apns.p12.certificate.password A string value that defines the password needed to access the certificate.

        <Environment name="ibm.appcenter.apns.p12.certificate.password" override="false" 
        type="java.lang.String" 
        value="this_is_a_secure_password"/>

      ibm.appcenter.apns.p12.certificate.isDevelopmentCertificate A boolean value (identified as true or false) that defines whether or not the provisioning profile used to generate the authentication certificate was a development certificate.

        <Environment name="ibm.appcenter.apns.p12.certificate.isDevelopmentCertificate" 
        override="false" type="java.lang.String" 
        value="true"/>

      See JNDI properties for Application Center for a complete list of JNDI properties that we can set.

Parent topic: Push notifications of application updates