Reputation: 38142
How can we configure the sound which gets played when an application is in the background and a push notification is received?
Upvotes: 1
Views: 2879
Reputation: 44698
Check out the "The Notification Payload" section of this document.
Example JSON Payload (adapted from above document):
{
"aps" : {
"alert" : "You got your emails.",
"badge" : 9,
"sound" : "bingbong.aiff"
}
}
The key you're looking for here is sound
, it's a string that points to an aiff
, caf
, or wav
file within your bundle.
Upvotes: 9