Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Narendar Singh

macrumors member
Original poster
Jun 22, 2012
76
0
INDIA
Hi,

I have an application. There can be two possible condition for the app.
1. Push notification is on
2. Push notification is off

we can see above two status from the Settings.

Can we detect programatically whether the push notification is on or off particular for this app.
 

truehybridx

macrumors member
Dec 6, 2010
86
0
Not sure if this still works, but found it on SO

Code:
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

if (types == UIRemoteNotificationTypeNone) {
     // No Notifications
} else {
     // Has Notifications
}

Origin http://stackoverflow.com/questions/9005889/how-to-check-that-notifications-are-enabled-on-iphone

For more in depth into the notification types, section marked UIRemoteNotificationType
http://developer.apple.com/library/.../UIApplication_Class/Reference/Reference.html
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.