iOS 推送通知 [英] iOs Push Notifications

查看:46
本文介绍了iOS 推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在设备上或使用苹果反馈服务知道用户已经继续使用并通过进入设置->通知->我的应用程序并关闭所有内容来关闭特定应用程序的通知?我需要一种编程方式来使用 Objective-C 或使用推送反馈服务在设备本身中执行此操作.谢谢大家.

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];

根据文档,这将返回:一个位掩码,其值指示用户为应用程序请求的通知类型.有关有效位掩码值,请参阅 UIRemoteNotificationType.

并检查类型:UIApplication 类参考

这篇关于iOS 推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆