gpt4 book ai didi

ios - 当我们清除通知时,Apple 推送通知信息丢失

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

我已收到推送通知,如果我打开推送通知,则 didReceiveRemoteNotification 正在调用并且我正在获取通知信息,而不是如果我清除通知并打开应用程序,则不会调用 didReceiveRemoteNotification。如何解决?

最佳答案

如果您从启动图标打开应用程序(而不是从推送通知打开它),didReceiveRemoteNotification 将不会被调用,您将无法访问通知数据。是否清除通知并不重要。

If the action button is tapped (on a device running iOS), the system launches the application and the application calls its delegate’s application:didFinishLaunchingWithOptions: method (if implemented); it passes in the notification payload (for remote notifications) or the local-notification object (for local notifications).

If the application icon is tapped on a device running iOS, the application calls the same method, but furnishes no information about the notification.

关于ios - 当我们清除通知时,Apple 推送通知信息丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24585484/

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