Incorrect return value for UIApplication enabledRemoteNotificationTypes
| Originator: | jack | ||
| Number: | rdar://13780078 | Date Originated: | 4/30/13 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 6.0 |
| Classification: | Other bugs | Reproducible: | Always |
Summary: When registering for remote notifications for the first time (i.e. when the user sees the permissions dialog), calling [application enabledRemoteNotificationTypes] in the AppDelegate's application:didRegisterForRemoteNotificationsWithDeviceToken: method returns UIRemoteNotificationTypeNone regardless of the user's choice. Upon future launches/calls to registerForRemoteNotificationTypes (anything after the first request), this method returns the correct value when called during application:didRegisterForRemoteNotificationsWithDeviceToken:. Steps to Reproduce: 1) Call [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; Note: In my implementation, I do this outside of application:didFinishLaunchingWithOptions:; I'm not sure if this makes a difference. 2) In the user-presented dialog, allow the application to receive those notification types 3) In the AppDelegate, during application:didRegisterForRemoteNotificationsWithDeviceToken:, call [[UIApplication sharedApplication] enabledRemoteNotificationTypes] Expected Results: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert Actual Results: UIRemoteNotificationTypeNone Regression: As far as I can tell this behavior does not take place prior to iOS6. Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!