Apple push notification service
Upcoming SlideShare
Loading in...5
×
 

Apple push notification service

on

  • 2,302 views

Apple Push Notification service (APNs for short) is the centerpiece of the push notifications feature. It is a robust and highly efficient service for propagating information to devices such as ...

Apple Push Notification service (APNs for short) is the centerpiece of the push notifications feature. It is a robust and highly efficient service for propagating information to devices such as iPhone, iPad, and iPod touch devices. Each device establishes an accredited and encrypted IP connection with the service and receives notifications over this persistent connection. If a notification for an application arrives when that application is not running, the device alerts the user that the application has data waiting for it.

Software developers (“providers”) originate the notifications in their server software. The provider connects with APNs through a persistent and secure channel while monitoring incoming data intended for their client applications. When new data for an application arrives, the provider prepares and sends a notification through the channel to APNs, which pushes the notification to the target device.

Statistics

Views

Total Views
2,302
Views on SlideShare
2,302
Embed Views
0

Actions

Likes
0
Downloads
37
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Apple push notification service Apple push notification service Presentation Transcript

  • Apple Push Notification Service
  • Introduction APNS Architecture Security Architecture Quality of Service Feedback service Notification payload Server side programming Client side programming
  • APNS Architecture The flow of remote-notification data is one- way. The provider composes a notification package that includes the device token for a client application and the payload. The provider sends the notification to APNs which in turn pushes the notification to the device.
  • Feedback Service Sometimes APNs might attempt to deliver notifications for an application on a device, but the device may repeatedly refuse delivery because there is no target application. This often happens when the user has uninstalled the application. In these cases, APNs informs the provider through a feedback service that the provider connects with. The feedback service maintains a list of devices per application for which there were recent, repeated failed attempts to deliver notifications.
  • Quality of Service Apple Push Notification Service includes a default Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification but the device is offline, the QoS stores the notification. It retains only one notification per application on a device: the last notification received from a provider for that application. When the offline device later reconnects, the QoS forwards the stored notification to the device. The QoS retains a notification for a limited period before deleting it.
  • Security Architecture Connection trust Token trustA device token is not the same thing as the device UDID returned by the uniqueIdentifier propertyof UIDevice.
  • Server (Provider) programming Create connection to APNS
  • Certificate and provisioning Log in to the iPhone Developer Connection Portal and click App IDs Ensure you have created an App ID without a wildcard. Wildcard IDs cannot use the push notification service. For example, our iPhone application ID looks something like AB123346CD.com.serverdensity.iphone Generate a Push Notification certificate. Import your aps_developer_identity.cer into your Keychain by double clicking the.cer file.”
  • Certificate and Provisioning Export “Apple Development Push Services ID123″ in to P12 “apns-dev-cert.p12”. Export Private Key also in to “apns-dev- key.p12 file”. Remove the passphrase openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
  • Certificates and provisioning Converting to PEM (Privacy Enhanced Mail Security Certificate ): openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12 openssl pkcs12 -nocerts -out apns-dev- key.pem -in apns-dev-key.p12
  • Certificates and Provisioning Combine the key and cert files into a apns-dev.pem cat apns-dev-cert.pem apns-dev-key- noenc.pem apns-dev.pem
  • References http://mobiforge.com/developing/story/pro gramming-apple-push-notification-services http://blog.boxedice.com/2009/07/10/how- to-build-an-apple-push-notification- provider-server-tutorial/ http://urbanairship.com/docs/push.html#fe edback-service