I know there is a possibility to check whether or not the user has disabled the push settings, as described in objective c – Detect when user change the app’s notifications settings.
According to the article above, the push notification is sent even if the user has disabled push notifications for the application. As I understand it I should always register for push notifications in applicationDidFinishLaunching:.
Most example looks like this, i.e. the user settings are ignored.
- (void)applicationDidFinishLaunching:(UIApplication *)app {
// other setup tasks here....
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
}
If the application should take these settings into consideration, how does a correct implementation look like?
The reason why I ask this question is because we have a lot of customers complaining that they are getting push notifications although they have disabled push notifications. This seems to apply to iOS 6.
Should I as a developer take care of the case when the user has disabled push notifications? I have read the documentation over and over again. In particular the documentation for application:didReceiveRemoteNotification:. It does not states if it is called when the user has disabled push notifications.
make sure you implement these methods to know whether the device registered or not
it is ok to register for push notifications everytime your app is launched. but you have to make sure you implement the methods above to know if the user has enabled or disabled notifications for the app.