I’m trying to implement Push Notifications for my iOS 5 application by the guide from Ray Wenderlich: http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12.
I’ve inserted the following into my didFinishLaunchingWithOptions method in my AppDelegate:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
When running the application on my device (not simulator) the popup/alert telling me to accept push notifications isn’t displayed. I’ve inserted a debug-point on the line, and I can see, that the registerForRemoteNotificationTypes is called.
Why is nothing happening?
Maybe, delete your app and try again. That dialog only appears once. But I’m not sure that whether that dialog will appear again when you reinstall that app.
You can also go to your setting app the notification center, see if your app is on the list.
You can also add a break point and see if didRegisterForRemoteNotificationsWithDeviceToken executes.