推送通知权限 [英] Push Notifications Permissions

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

问题描述

试图解决一些角落情况下,当推送通知的应用程序被拒绝,我有两个问题:

Trying to work around a few corner cases for when push notifications are denied in the app and I have two questions:

1)有没有一种方法重置用户是否已经看到了通知请求弹出?

1) Is there a way to reset whether the user has seen the notification request pop up?

2)有什么办法没有确定用户是否表示通知要求?

2) Is there any way to determine if the user has said no to the notification request?

推荐答案

1)没有,除非有一些私人的API,这样做,但不是由苹果允许

1) No, unless there's some private API that does that, but that's not allowed by Apple

2)你的应用程序启动第一次,打完电话后的 registerForRemoteNotificationTypes ,您可以检查 didRegisterForRemoteNotificationsWithDeviceToken 被调用。如果不是,用户说不,谢谢。

2) The first time your app is started, after calling registerForRemoteNotificationTypes, you can check if didRegisterForRemoteNotificationsWithDeviceToken is called. If it's not, the user said "No thanks".

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

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