gpt4 book ai didi

ios - userNotificationCenter didReceive 响应包含空通知(watchOS)

转载 作者:行者123 更新时间:2023-12-04 08:44:08 26 4
gpt4 key购买 nike

我正在尝试从 userNotificationCenter(_:didReceive:withCompletionHandler:) 中检索原始通知内容在 watchOS 中。从 APNS 发送推送通知时,我设法触发了回调,但不幸的是,response对象包含一个空 notification :<UNNotificationResponse: 0x600003bc0b40; actionIdentifier: start, notification: (null)>我正在使用来自 Listing 1 的示例来自苹果的文档。
更新 10/19/20
我创建了一个示例项目 SampleNotification重现问题(有关如何重现,请参阅 README.md)。我注意到只有当用户按下 UNNotificationAction 时,回调才会返回一个空通知。 .而且,我确认这个模式是不是 在iOS中观察到。
似乎在 userNotificationCenter(_:willPresent:withCompletionHandler:) 中收到相同的通知不是空的!
我很感激任何反馈

最佳答案

我在 watchOS 7.1 和 ios 14.1 上遇到了同样的问题。我联系了 Apple 技术支持团队。这是我从他们那里得到的答复

"Our engineers have reviewed your request and have determined that you are experiencing a known issue for which there is no known workaround at this time."

关于ios - userNotificationCenter didReceive 响应包含空通知(watchOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64416747/

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