Reputation: 829
My app uses Local Notifications to communicate with the user. The legacy code for iOS4 is working well, but in iOS5, notifications are not shown. After reading on the web, I added the following in the didFinishLaunchingWithOptions: method
[[UIApplication sharedApplication]registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeSound];
I still do not see the app in the Notification Center. Is anything more required to make the app being listed in the Notification Center?
Sam.
Upvotes: 2
Views: 1748
Reputation: 54593
You also need to have a provisioning profile for your app that allows for push notifications. If something goes wrong when registering for push notifications, your app delegate will get notified via application:didFailToRegisterForRemoteNotificationsWithError:
. The error object will contain relevant information. Use it to verify that nothing goes wrong.
Upvotes: 1