0

I want to implement push notification in an iOS device using FCM. I have followed full document of firebase but when my application is in the background at that time sound is not working. Here it is my payload which I am using with this https://www.apnstester.com/fcm/

{
"notification": {
        "title":"Title",
        "body":"My Message",
        "sound":"default"
    },
    "priority":"high"
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Rushabh Shah
  • 396
  • 3
  • 19
  • https://stackoverflow.com/questions/39335363/fcm-notification-in-ios-doesnt-play-sound-when-received Have you seen these answers? – Victor Sanchez May 03 '19 at 05:14
  • Yes, If i am trying with HTTP request sound is working very well. But when I am trying this site https://www.apnstester.com/fcm/ at that time sound is not playing otherwise. – Rushabh Shah May 03 '19 at 05:40

1 Answers1

-1

Here is my working Code:

{
"to": "fa_elM1dCdw:APA91bHoQFMhVSm6_cI60ow0nH-hnOPaTsjXnh_JLNHMTFvPJI6VAk3_hCRmwZZDWobBRwJkEDofgi4By-UG61ftHFTrvlvqd8fTJsEZRryt0JoavV2AHDXh_Cm4lvIYC3c6PfUiDthJ", //FCM Token
 "notification":
 {
   "title": "Title",
   "body": "Message",
   "sound": "default"
 },
 "priority": "high",
 "content_available": true
}

Also Don't forget to Turn On your Device Sound.

iHarshil
  • 739
  • 10
  • 22