0
votes

I am using a UNNotificationService extension to update the Payload content of a received Push Notification. I'm able to change the displayed alert text and the updated text is correctly displayed. However changing

"sound":"default" => "sound":"something.caf"

does not play the modified sound. The default alert sound is played.

The audio file "something.caf" is packaged with the App and plays correctly when the Payload received from the backend server contains "sound": "something.caf".

Any suggestion to what I should be looking at? (missing configuration etc)

Thanks

2

2 Answers

0
votes

Is the sound file added to your Notification Service ?

You can verify this on inspector tab -> Target Membership section

0
votes

Setting the "UNMutableNotificationContent.sound" property to the required sound file fixes the issues and plays the required file.