gpt4 book ai didi

ios - 如何在 iOS 的应用程序内打开/关闭 GCM 推送通知的设置功能?

转载 作者:行者123 更新时间:2023-11-30 12:45:25 26 4
gpt4 key购买 nike

我为我的 iOS 应用程序集成了 GCM 推送通知。我做了一些关于在应用程序内关闭/打开苹果推送通知的研究。有一种方法使用“unregisterForRemoteNotifications”。但不幸的是,它不适用于 iOS 10。有没有办法在应用程序内关闭/打开 GCM 推送通知?

最佳答案

Apple documentation中的此声明关于unregisterForRemoteNotifications可能对您有帮助:

You should call this method in rare circumstances only, such as when a new version of the app removes support for all types of remote notifications. Users can temporarily prevent apps from receiving remote notifications through the Notifications section of the Settings app. Apps unregistered through this method can always re-register.

其他见解也可以在 this forum 中找到。 。如前所述,最好的解决方案是标记应用程序功能后台获取。这将使 application:didRegisterForRemoteNotificationsWithDeviceToken 在调用 registerForRemoteNotifications 之后被调用。

除此之外,您可能还想查看相关 SO post 中建议的解决方案。 .

关于ios - 如何在 iOS 的应用程序内打开/关闭 GCM 推送通知的设置功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41695685/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com