iOs Push Notifications

故事扮演 提交于 2019-12-23 17:52:45

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/7080279/ios-push-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!