APN custom notification sound issue

前端 未结 1 1160
清歌不尽
清歌不尽 2020-12-11 17:35

I have remote notifications setup and working fine. I however have to play a custom sound when a notification is received (when app is NOT in foreground). I have added a fil

相关标签:
1条回答
  • 2020-12-11 18:36

    No your sound key should have the sound file name you want to play.

    {
      aps =
      {
        alert = "message";
        sound = "sound file name.extension";
        badge = 1;
      };
    }
    

    eg: { aps = { alert = "message"; sound = "tone.caf"; }; }

    I am using this and getting successful custom alert on my notification; keep sound duration as small as possible. I did with this file format: aiff, caf

    if u want to test notification then u can try this app https://itunes.apple.com/us/app/easy-apns-provider-push-notification/id989622350?mt=12

    I am not doing any marking of this app but it is good for testing push notification

    0 讨论(0)
提交回复
热议问题