Preparing the APNS Channel Jar File

The APNS Delivery Channel enables Connect to deliver messages to applications deployed on iOS devices like iPhones, iPad, and iPod Touches. Since each iOS application requires dedicated connections to the APNS servers, each application must be configured as a separate Delivery Channel.

The Delivery Channel software component resides in the import/channel_apns.jar file that is included with the Connect software distribution. The configuration information and certificate for each delivery channel must be manually stored in the channel_apns.jar file before being deployed to the cluster nodes.

Preparing the Properties File

In Connect, each APNS Delivery Channel instance has a name, such as “apns1” or “hybridapp223”, and a properties file that is named based on the channel name. For example, if the Delivery Channel instance is named “apns1”, then the channel_apns.jar file should contains a properties file named “apns1.properties”. The properties file should contain the properties defined in the table below:

Property Name Value
apns.gateway.host gateway.push.apple.com or gateway.sandbox.push.apple.com
apns.gateway.port 2195
apns.feedback.host feedback.push.apple.com or feedback.sandbox.push.apple.com
apns.feedback.host 2196
apns.certificate.filename Filename containing SSL client certificate from the Apple iOS Provisioning Portal. Must be in .p12 format with a password. This file should also be added to the channel_apns.jar file.
apns.certificate.password SSL client certificate password in clear text.
apns.min.pooled.service.objects Minimum size of APNS connection pool; e.g. 10.
apns.max.pooled.service.objects Maximum size of APNS connection pool; e.g. 20.
apns.feedback.poll.interval.minutes How often, in minutes, to poll the APNS feedback service.
apns.dns.scanning.time.to.live The APNS servers are clustered using round-robin DNS. This property controls how long DNS entry will be cached (in milliseconds).
apns.service.wait.for.delivery.error.ms If no error is received from APNS after this time interval, then consider the message successfully delivered.
apns.trim.notification.alert.if.too.long What to do if notification payload is too long. If true, truncate the payload and send the notification. If false, do not send the notification and return a failure code.
apns.keystore.type Supported java keystore type; e.g. jks, jceks.
apns.keystore.location The location of the keystore file: expressed as a url or as a file name.
apns.keystore.password Password to access the keystore file.
apns.keystore.certificate.alias Alias (name) of the APNS server certifcate in the keystore file.
apns.keystore.certificate.password Password to access the APNS server certifcate in the keystore file.
An example APNS delivery channel properties file is shown below:
apns.certificate.filename=apns-prod-client-cert.p12
apns.certificate.password=password
apns.gateway.host=gateway.push.apple.com
apns.gateway.port=2195
apns.feedback.host=feedback.push.apple.com
apns.feedback.port=2196
apns.feedback.poll.interval.minutes=30
apns.max.pooled.service.objects=20
apns.min.pooled.service.objects=10
apns.dns.scanning.time.to.live=21600
apns.trim.notification.alert.if.too.long=true                 
                

Adding files to the APNS Channel Jar File

The certificate file and the properties file can be added to the jar using the zip program:
                zip channel_apns.jar apnstest1.properties
                zip channel_apns.jar apns-dev-cert.p12
                
This operation should be performed using the channel_apns.jar file in the Connect installation directory.