IOS5: how to determine if the notification center is turned on for an application on / off

I want to respect the intentions of my users and not call [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(...)] if they disabled remote notifications for my application.

When I call UIRemoteNotificationType enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes] I get information about what types of notifications are enabled for my application. However, the Notification Center for this application can be disabled, and I still get the previously activated notification type from this method until we select "No".

Therefore, my application considers that notifications are included, even if they are not.

Is there a way to programmatically find out the status of the Notification Center for my application? (ON / OFF).

+6
source share
1 answer

Do not confuse "in the notification center" with "push notifications" enabled. I can remove the application from the notification center, but still receive push notifications in the form of icon numbers, so your old method should work fine.

+9
source

Source: https://habr.com/ru/post/901345/


All Articles