
96 ◾ Lauren Collins
[application
registerForRemoteNotificationTypes:UIRemoteN
//Add the view controller’s view to the window and
display
[window addSubview:viewController.view];
[window makeKeyAndVisible];
return YES;
}
Notice we are only passing UIRemoteNoticationTypeAlert, because
all we want to receive right now is alerts. If you would like to receive other
notications, go ahead and add them:
[...]Types:UIRemoteNotificationTypeAlert | UIRemoteN
With these modications to our app delegate, the OS will begin register-
ing with the Apple Push Notication Service (APNS). If it succeeds, it will
send an application.didRegisterForRemoteNoticat ...