iworld
iworld

Reputation: 345

Push notification sound is not working

I am using Push Notifications in my app.when notifications comes,i am not getting the notification sound of the notification and also in iPad settings i switched-on all the notification buttons in iPad even though the notification sound is not coming.

{
    alert = "Testing commands@2014-12-01T12:16:26",
    sound = "default"
}

I am getting the sound file like this.But the notification sound is not coming.

I am new to the PushNotification concept.Can anyone please help to solve this...

Upvotes: 0

Views: 1509

Answers (1)

Ammar
Ammar

Reputation: 719

you should use JSON format to send your notifications encapsulated in aps dictionary like:

{

    "aps" : {

        "alert" : "Your message.",

        "badge" : 0,

        "sound" : "default"

    }
}

for complete reference: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

Upvotes: 2

Related Questions