14
Problem:
The app doesn't appear on notification center and it is unable to receive push notifications right after installation completes and the app registers for push notifications via registerForRemoteNotificationTypes:.
Details:
- The app usually appears in notification center after the device is restarted and after that everything works just fine.
- Sometimes the app shows up in notification center right after intallation and registration for APNs(I still can't confirm this but I think I stumbled upon such situations).
- The app calls the method
registerForRemoteNotificationTypeseach time a user logins and each time a user logouts respectively with bit masks (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound) andUIRemoteNotificationTypeNone. enabledRemoteNotificationTypesreturns correct values.- Initially I used the method
unregisterForRemoteNotificationson logout but I changed it toregisterForRemoteNotificationTypes:UIRemoteNotificationTypeNonedue to suspicians that this could be causing the problem . - This problem occurs in both development and adhoc builds and irrespectively of whether the app is installed via xcode or itunes.
Any thoughts and advices will be greatly appreciated. Thank you!