iosswiftfirebasefirebase-cloud-messagingfirebase-console

Playing custom push notification sound via Firebase Cloud Messaging Console


I have a push notification setup via Firebase Cloud Messaging Console.

In the payload, I added sound as my key and custom_sound.wav as my value.

My sound file (custom_sound.wav) is in Copy Bundled Resources of the project.

When I test the notification, the default sound continues to play instead of the custom sound file.

Separate from the notification via the console, the sound does play via Firebase Cloud Functions with the similar payload I send.

Can anyone advise?

I was looking into handling from the delegate function didReceiveRemoteNotification but read it only fires when the notification is tapped on. I also printed out the payload from didReceiveRemoteNotification and it prints the "sound" key/value outside the "aps" object...


Solution

  • After talking to Firebase support, they confirmed a custom notification sound cannot be played via the Firebase Cloud Messenger Console. A feature request has been filed.