I noticed that every device registered in our database for our just-approved app is showing up as having declined all push notifications. None of our testers' devices had this problem, and I couldn't repro it on mine. Of course, testing this is nearly impossible, because Apple gives developers no way to reset push-notification settings except wiping the entire device.
We discovered that, on the first launch of the released version of the app, iOS tells us that all notifications for the application are turned off. The second time it's run, they're reported correctly. The problem is that our app can run in the background, so we never know when or if the second launch will occur. Has anyone else noticed this? Here's the code where we check the notification elections: - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)pushToken { // Check what notifications the user has turned on. We registered for all three, but they may have manually disabled some or all of them. NSUInteger RNTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; // Set the defaults to disabled unless we find otherwise... NSString* pushBadge = (RNTypes & UIRemoteNotificationTypeBadge) ? @"enabled" : @"disabled"; NSString* pushAlert = (RNTypes & UIRemoteNotificationTypeAlert) ? @"enabled" : @"disabled"; NSString* pushSound = (RNTypes & UIRemoteNotificationTypeSound) ? @"enabled" : @"disabled"; Thanks for any insight! Gavin _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com