29Push Notifications and Networking

On an iOS device, only one application can run in the foreground at a time. Sometimes, you want an application that isn’t currently running to notify you when something happens: an opponent in a game makes a move, a buddy sends you a message in a chat program, or you have 5 minutes to get to your next meeting.

Push notifications are one approach to solving this problem. A push notification is a message sent from Apple’s servers to a device. The user sees a pop-up window on screen with the name of the application that has been notified, a message, and possibly an alert sound or icon badge.

It’s not a coincidence that it is difficult to find a working implementation of push notifications on the Net – this stuff ...

Get iOS Programming: The Big Nerd Ranch Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.