Summary
In this chapter, you saw push notifications both from a client-building point of view and as a provider. You learned about the kinds of notifications you can send and how to create the payload that moves those notifications to the device. You discovered registering and unregistering devices and how users can opt in and out from the service. You saw how to create a provider utility that pushes new Twitter items.
Much of the push story lies outside this chapter. It's up to you to set up a server and deal with security, bandwidth, and scaling issues. The reality of deployment is that there are many platforms and languages that can be used that go beyond the Objective-C sample code shown here. Regardless, the concepts discussed and recipes shown in this chapter give you a good stepping off point. You know what the issues are and how things have to work. Now it's up to you to put them to good use.
- The big wins of notifications are their instant updates and immediate presentation. Like SMS messages, they're hard to overlook when they arrive on your iPhone. There's nothing wrong in opting out of push if your application does not demand that kind of immediacy.
- Guard your SSL certificate and device tokens. Although it's too early to say how Apple will respond to security breaches, experience suggests that it will be messy and unpleasant.
- Don't leave users without service when you have promised to provide it to them. Build a timeline into your business plan that anticipates what it will take to keep delivering notifications over time and how you will fund this. Consumers will not be tolerant of extended downtimes; your service must be completely reliable.
- Build to scale. Although your application may not initially have tens of thousands of users, you must anticipate a successful app launch as well as a modest one. Create a system that can grow along with your user base.