iOS Push Notification No Sound
According to Apple's documentation you need to specify default
if you want to the default push notification to be played:
The name of a sound file in the app bundle. The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played. The audio must be in one of the audio data formats that are compatible with system sounds; see Preparing Custom Alert Sounds for details.
The final JSON output:
{
"aps" : {
"alert" : "Test Push Message",
"sound" : "default"
};
}
You should modify server JSON output to this. default
it is sound type of the notification on your phone.
{
"aps": {
"alert": "test",
"sound": "default"
}
}
for playing sound when our app receives push notification your json must contains sound attribute. so json like this
{
"aps":{
"alert" :"your test message",
"sound":"default"
};
}