我试图发送推送通知从防火墙到iOS设备,但没有成功。以下是我尝试的有效载荷:
var message = {
notification: {
title: '$GOOG up 1.43% on the day',
body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
},
apns: {
headers: {
"apns-priority": '10'
},
payload: {
aps: {
alert: {
title: '$GOOG up 1.43% on the day',
body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
},
"content-available": true
}
}
},
token: "adacxxxxxx 152 string"
};当我试图触发fbAdmin.messaging().send(message)时,我会收到{"code":"messaging/internal-error","message":"Internal error encountered."}。
我有另一种Android格式,它运行得很好。因此,我试图理解为什么iOS不起作用。任何建议或帮助都是非常感谢的,因为我在这方面花了几天时间。
发布于 2018-11-06 07:33:43
我已设法使这一工作自己通过尝试跟随。
How can I send a Firebase Cloud Messaging notification without use the Firebase Console?
在尝试调用fcm之后,我得到了错误"InvalidAPNsCredentials“。然后我意识到我的Auth键出了问题。然后,我不得不重新下载auth密钥,更正了团队ID,并再次运行应用程序,现在它开始工作了!
https://stackoverflow.com/questions/53112760
复制相似问题