gpt4 book ai didi

ios - 如何在 IOS 12 中用新收到的通知(包含相同的通知 ID)替换推送通知

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:28:24 24 4
gpt4 key购买 nike

我正在处理 ios 丰富的推送通知。如果 key (例如“notification_id”)在有效负载中相同,则想要用新收到的通知替换通知托盘中先前收到的通知。我已经尝试过“https://medium.com/the-guardian-mobile-innovation-lab/how-to-replace-the-content-of-an-ios-notification-2d8d93766446”中提到的解决方案,它适用于 ios 11 但不适用于 ios 12。

最佳答案

传递与您要替换的通知相同的 collapse_id。以下是 collapse_id

的说明

Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters.

关于ios - 如何在 IOS 12 中用新收到的通知(包含相同的通知 ID)替换推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54004620/

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