Reputation: 9783
At the moment I am using node-apn
to send a push notifications
from my server using the following for the sound:
notification.sound = "ping.aiff"
I'm assuming "ping.aiff"
is a local system sound on iOS
devices. Is there any library for other system sounds that I can define in the same way? Or is this the only one available for a default sound.
Upvotes: 2
Views: 7662
Reputation: 2924
default
is the only one available, and it can change according to what the user has configured in their system settings, but it doesn't depend on the app to play a "different default".
Whatever other sound you want to play, you need to include it in your app bundle and send it along the remote push notification aps.sound:"custom.aiff"
.
More info on Apple documentation.
Upvotes: 1
Reputation: 3291
There are three basic things (alert
, badge
, sound
) in payload which must have otherwise it'll miss on execution, the sample payload should be like following. [See Documentation][1]
{
“aps” : {
“alert” : “Your message here.”,
“sound” : “default”,
“badge” : 9
}
}
the default
keyword will play default sound of Notification, and you can also play your custom sound like “sound” : “ping.aiff”,
Hope this will help.
Upvotes: 2