apple push notifications with phonegap

Brought to you by...


HOLLY SCHINSKY
Blog: http://devgirl.org
Twitter: @devgirlfl

Apple Push Notification Service (APNs)

  • A service provided by Apple for sending information to Apple devices over a PERSISTENT and SECURE connection.
  • A store and forward service






registration workflow


  • Call to register device with APNS, unique token returned. 
  • Register token with 3rd party server (the server that will be sending notifications needs to know your device is eligible to receive and the device token to send to)...
  • Message Workflow


    • When your 3rd party provider has data to send to your app, it connects to the APNS server with security credentials and a device token. The APNS server validates the security and token and will forward on to the device when both are valid.            
    • When your device receives the notification, it checks the payload for the application to notify and open.

    APnS REquired FILES


    .certSigningRequest - cert request file from Keychain 
    .cer - SSL certificate from Dev Portal
    .p12 - private key exported from Keychain
    .mobileprovision - provision file from Dev Portal
    ** .pem - another format for storing keys and certificates. Can also hold a combined key + certificate for easier use with 3rd party providers and server APIs.

    ** optional but nice to have



    Links

    • PushPlugin - https://github.com/phonegap-  build/PushPlugin
    • Ray Wenderlich's Push Notification Tutorial - http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
    • My blog w/ detailed tutorials on the above and more Push Notification/Phonegap tutorials - http://devgirl.org
    • Argon - Node APN Library - https://github.com/argon/node-apn 



    Made with Slides.com