我已经为UNNotificationServiceExtension创建了一个目标,用于编辑通知标题。
现在,如果我使用、Pusher、、使用、APNS、,我的通知标题就会更改,并且它会正常工作。
{"aps":{"alert":"push Notification","badge":1,"sound":"default","mutable-content":1}}这是我通过APNS发送的。
但是我没有找到FCM的解决方案,你应该发送什么数据以及它将如何工作?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
}发布于 2018-11-14 13:19:40
我也有同样的问题,修改有效载荷也帮助了我。
{"aps":{"alert":"push Notification","badge":1,"sound":"default","mutable_content":true}}有关更多细节,请浏览此链接
https://stackoverflow.com/questions/48825184
复制相似问题