iOS -通过FCM向apn发送推送通知图像不工作



尝试使用Firebase Cloud Messaging向apn发送图像,但Firebase Docs中的有效载荷不起作用。

Firebase Docs: https://firebase.google.com/docs/cloud-messaging/ios/send-image

## Request
curl -X "POST" "https://fcm.googleapis.com/fcm/send" 
-H 'Content-Type: application/json' 
-H 'Authorization: key={web_token}' 
-d $'{
"to": "fcm_token",
"priority": "high",
"apns": {
"payload": {
"aps": {
"mutable-content": 1
}
},
"fcm_options": {
"image": "mage_urli"
}
},
"data": {
"Room": "PortugalVSDenmark",
"Nick": "Mario"
},
"notification": {
"title": "Portugal vs. Denmark",
"body": "great match!"
}
}'

所以我遇到了同样的问题,我在有效载荷的通知字段中添加了图像,修复了它。

下面是一个例子:

"notification": {
"title": "Portugal vs. Denmark",
"body": "great match!",
"image": "image-url"}

好像文档写错了。

最新更新