Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check that notifications are enabled on iPhone

How to check that notification is enabled on iPhone? I install the application, application say to confirm enable push notification for application, i click ok. But if notification disabled on iPhone, this action does not enable notifications. How to check that?

like image 955
Oksana Avatar asked Jan 25 '12 16:01

Oksana


1 Answers

This should work:

UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
if (types == UIRemoteNotificationTypeNone) 
   // Disabled
like image 156
Zar Avatar answered Nov 08 '22 03:11

Zar