Kevin Kevin - 1 year ago 106
iOS Question

Determine on iPhone if user has enabled push notifications

I'm looking for a way to determine if the user has, via settings, enabled or disabled their push notifications for my application.

Answer Source

call enabledRemoteNotificationsTypes and check the mask.


UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
if (types == UIRemoteNotificationTypeNone) 
   // blah blah blah

iOS8 and above:

[[UIApplication sharedApplication] isRegisteredForRemoteNotifications]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download