I have set up remote notifications and it works fine. However, I have to play my own sound when I receive a notification (when the application is NOT in the foreground). I added a file called customSound.wav to my application package and made sure that โadd to targetsโ is selected when I drag it into my project (is this the right way?). On the server side: one file name was specified as "sound": "customSound.wav". In my didReceiveRemoteNotification, I print the userInfo dictionary, and it looks like this:
aps = { alert = "Good Evening Sir"; badge = 1; "custom_filed1" = 1; "custom_field2" = "AAA-BBB-CCC"; name = "Sir Hubert"; sound = default; };
As you can see, the sound is still "default". I know that if the specified sound cannot be found, the default sound is played - whether the sound value in the dictionary will also be โdefaultโ or should there be a file name specified in the json payload. The order in which they are indicated in the payload is important. I tried offers from other threads, but did not work for me. I can not show json since I do not have access to the system at the moment. Any suggestions on what I might be doing wrong?
source share