简体   繁体   中英

iOs Push Notifications

Is there a way to know on the device or by using apple feedback service that the use has gone ahead and turned the Notifications off for the specific application by going into Settings->Notifications->MyApp and turning everything off? I need a programmatic way to do this either in the device itsels using Objective-C or by using push feedback service. thanks to all.

Yes you can use this:

UIRemoteNotificationType enabledNotifications = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

As per the documentation this will return: A bit mask whose values indicate the types of notifications the user has requested for the application. See UIRemoteNotificationType for valid bit-mask values.

And check the types: UIApplication class reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM