Reputation: 279
I am using Firebase to send notifications to iOS devices. The setup is working fine: notifications are being received on the target devices. The problem is that they are silent - no sound is accompanying the notification.
When I send a test alert via the FCM console, and enable the sound dropdown, the notification is received with sound.
According to https://stackoverflow.com/a/51048292/6002780 I need to specify the sound as "default" within the apns>payload>aps section of the request. I have tried this to no avail.
According to apple's docs if the sound file cannot be found, or the value is set to default, the default sound will be played. This does not appear to be the case with Firebase.
Any ideas on how to get the default notification sound playing?
Upvotes: 2
Views: 3840
Reputation: 279
Turns out there is a bug in iOS. For me, I had originally set my app up with an incorrect fcm messaging option for sound. This ineffect meant I was sending notifications without sound. Once I had corrected this fcm setting issue (using the format as indicated in the referenced link in my question), I still had no sound. The fix was to go into the iOS notification settings for my app and toggle “sound” to off then on again. Problem solved.
Upvotes: 0