user3570727
user3570727

Reputation: 10213

Unable to play sound when APNS push notification comes in

I am not sure what I am missing, I have permission to play sound and get notification. I get the notification sent to the device, but it fails to play the sound. My payload is :

{
   "aps": {
      "badge": 2,
      "category": "Hello World",
      "alert": {
         "title": "Test Team",
         "body": "It just works!",
         "sound":"sound.caf"
      }
   },
}

The sound.caf is in my application bundle, I can play the sound from the app. So what am i missing? I am on iOS 14.1

Upvotes: 0

Views: 432

Answers (1)

Mozz
Mozz

Reputation: 328

Try changing the value of sound to "sound": "default". If that doesn't work, try moving the sound from the "alert" to "aps"

Upvotes: 1

Related Questions