Sound APNS for iOS

I am having trouble adjusting the sound of a message for my application.

So, in the apns response sent by the server, I specify "sound" : "default" , and all this is good. But if I set "sound":"chime" or "sound":"note" , they don't seem to work. He always plays by default. These are the sounds that I see in the form of iPhone β†’ settings β†’ Sounds.

How can I use β€œNote” as my preferred sound notification, or should I create my own sound and add it to the package?

+6
source share
1 answer

If you want to play sound other than standard, you will need to pack the sound in your kit and specify the name of the sound file in the payload. For example, if I included a sound file called notificationCupcake.caf in my application, I would include this JSON key / value pair in push:

  "sound": "notificationCupcake.caf" 
+8
source

Source: https://habr.com/ru/post/974286/


All Articles