React-native-firebase: [iOS] Sound not working. Android is perfect.

Created on 27 Sep 2018  路  4Comments  路  Source: invertase/react-native-firebase

Issue

iOS not playing sound.

const notification = new firebase.notifications.Notification()
    .setTitle("message.title")
    .setBody("message.body")
    .setSound("default")
    .setNotificationId("message.action");
firebase.notifications().displayNotification(notification);

I'm also trying to play a custom sound "alarm.mp3", that doesn't work. I added it to my Xcode project.
I'm testing on iPhone 6 (11.4.1) and iPad (10.3.3). No one work.

Environment

  1. Application Target Platform:

iOS 11.4.1 and 10.3.3.

  1. Development Operating System:

Developing on Linux Mint, but compiling on macOS High Sierra 10.13.6.

  1. Build Tools:

Xcode 9.4.1

  1. React Native version:

0.55.4

  1. React Native Firebase Version:

藛5.0.0

  1. Are you using typescript?

No.


Loving react-native-firebase? Please consider supporting them with any of the below:

Most helpful comment

Shame on me, sorry guys. I'm not familiar with apple toys, didn't know about a beautiful mute button hidden on device's side. :sweat:

All 4 comments

Shame on me, sorry guys. I'm not familiar with apple toys, didn't know about a beautiful mute button hidden on device's side. :sweat:

at iOS, where you put mp3 file at xcode?

Thank you

@dominicsavb I believe with iOS you have to load the audio file thru Xcode.

I had exactly similar issue with @vendramini. Beautiful mute button causes big trouble lol.

Was this page helpful?
0 / 5 - 0 ratings