通知负载肯定是问题的一部分。
在您的问题中,有效载荷是:
{
"aps":{
"mutalbe-content":1,
"content-available":1,
"sound":"true",
"alert":{
"title":"Vera Pauw",
"body":"test bericht"
},
"data":{
"type":"test",
"message":"test bericht",
"chatId":"3b002aa6-1117-4206-b54f-8bc2bd689f1c",
"fromId":"",
"fromname":"Vera Pauw"
}
}
}
aps
密钥应该只包含苹果的密钥。你的
data
词典应该在词典外
钥匙。
这个
"content-available"
如果
alert
,
button
,或
sound
钥匙在那里-通知不能都是静默的
面向用户。
content-available
仅用于静默通知。
"mutalbe-content"
我看到很多人有同样的问题,所以我写了
a simple push notification validation tool you can use to troubleshoot these problems
.
根据您试图完成的任务,修正后的有效负载可能如下所示:
{
"aps":{
"mutable-content":1,
"alert":{
"title":"Vera Pauw",
"body":"test bericht"
}
},
"data":{
"type":"test",
"message":"test bericht",
"chatId":"3b002aa6-1117-4206-b54f-8bc2bd689f1c",
"fromId":"",
"fromname":"Vera Pauw"
}
}
试试看扩展是否启动。