Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

21. Push Notifications > Registering Your Application

Registering Your Application

Signing an application with a push-compatible mobile provision is just the first step to working with push notifications. The application must request to register itself with the iOS device’s remote notification system. You do this with a single UIApplication call, as follows. The application: didFinishLaunchingWithOptions: delegate method provides a particularly convenient place to call this.

[[UIApplication sharedApplication]
    registerForRemoteNotificationTypes:types];

This call tells iOS that your application wants to accept push messages. The types you pass specify what kinds of alerts your application will receive. iOS offers three types of notifications:

UIRemoteNotificationTypeBadge—This notification adds a red badge to your application icon on SpringBoard.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial