【发布时间】:2018-08-25 11:45:40
【问题描述】:
我正在尝试使用此处所述的 apns 密钥向我的设备发送通知:https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#ApnsConfig。
推送通知确实到达,但标题未被覆盖。当我省略 notification 键时,只有在添加 content_available: true 选项时才会(在后台)发送通知。
我的身体是这样的:
{
"to" : <TOKEN>,
"apns" : {
"payload" : {
"aps" : {
"alert" : "Does not work",
"badge" : 1,
"sound" : "bingbong.aiff"
}
}
}
"notification" : {
"body" : "Works"
}
}
无论我尝试什么组合,Firebase 似乎都忽略了 apns 键。我做错了什么?
【问题讨论】:
-
它是如何为您解决的? (假设它最终对你有用)
-
我最后只用了通知键
-
有人找到解决办法了吗?
标签: firebase apple-push-notifications firebase-cloud-messaging