Andy Peters [me]

Stuff and Things.

11 notes &

Apple Push and Local Notifications Refresher

Its been a while since I last dived into Push Notifications.  Naturally I dived into it when it first came out and then some more times when working with clients.  With Ninth Division, I have a client project coming up that will rely heavily on push notifications.  So I wanted do a quick refresher.

If you have read this far, I have to assume so are you.  Because of that I exported and create a new project to demonstrate some fun with the Push Notification framework.

As you know, since Push notifications came out apple added the ability to do local notifications within your app.  Instead of going over all the basics of what are notifications, I am writing a simple blog with a sample project for you to mess with the notification framework yourself.

First!  Please open and read Apple’s Documentation regarding their Notification Framework.

Second: Got check out the code I released available on:  Github and Bitbucket.

Third: The actual iOS code to do push notifications is very very simple.  All you need is the project I linked above and a Apple Developer Account.  Login to your Apple Developer Account and setup App you wish to test with.  How to do this can be found here.

Fourth: You will need something to “send a notification to Apple’s Push Notification Service.”  There are lots of ways to do this.  The simplest way I found (and documented in the projects) is to use a Ruby gem called apnserver.  Its very well done and easy to use.  I’m told its used in production by a lot of projects as well.

Coming Soon:  I ran out of time to put in the code for testing Local Notifications.  I’ll be updating the project on both Github and Bitbucket soon with some fun code for local notifications.

Filed under devleoper development programming iOS apple push notifications

  1. andypeters posted this