IOS上的推送通知的自定义声音不起作用

时间:2019-07-15 06:29:50

标签: flutter dart push-notification firebase-cloud-messaging

我目前正在flutter上使用firebase_messaging实现推送通知。目前,它适用于android。但是对于ios,它不起作用。我在bundle资源中插入了alarm.caf,下面是json的有效负载。

{
 "to": "id_key",
 "collapse_key": "type_a",
 "priority": "high",
 "content_available": true,
 "notification": {
   "body": "This is a testing for push notification",
   "title": "Push Notification",
   "sound": "alarm.caf",
  },
 "data": {
   "screen": "/SecondPage",
   "wifi_strength": "good",
   "owner_name": "Jeff ",
   "device_name": "Kitchen",
   "click_action": "FLUTTER_NOTIFICATION_CLICK"
  }
}

现在,当我将声音更改为“默认”时,它将提供通知的默认声音,但是我想使用自定义声音。它甚至不会振动。

0 个答案:

没有答案