【发布时间】:2019-11-21 10:52:20
【问题描述】:
我正在使用 FCM 从服务器向 iOS 设备发送推送通知,但我成功收到通知但无法播放自定义通知声音。
这是我的有效载荷
{
"to":"myToken",
"notification":{
"title":"new message",
"body":"Hello World!",
"sound":"tweet_sent.caf",
"badge": 3
}
}
注意:我还将“tweet_sent.caf”文件添加到 Xcode 包中
【问题讨论】:
-
请将“通知”键替换为“aps”键。
-
stackoverflow.com/a/70939615/2126077 在这里查看我的答案
标签: ios node.js swift firebase apple-push-notifications