ios - 推送通知的自定义声音不起作用

标签 ios push-notification apple-push-notifications

我为推送通知添加了自定义声音,但它不起作用。我已按照以下步骤操作。

  1. Added custom sounds with extension .caf (sound is length of 8 seconds)
  2. Added it to bundle resource
  3. Sent the following payload from server
"aps" : {
        "alert" : "Hey you got a push notification.",
        "badge" : 1,
        "sound" : "ringtone.caf"
    }

捆绑资源的屏幕截图。 enter image description here

但是它不起作用:( 还需要什么吗?

最佳答案

卸载并重新安装应用程序对我有用!

关于ios - 推送通知的自定义声音不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47329000/

相关文章:

android - Android、IOS 和 Windows Phone 上的应用程序 UI 相同

firebase - FirebaseMessagingError.FirebaseError 错误 : Requested entity was not found. [作为构造函数]

PHP 如何解压 Apple APNS 反馈数据

android - React-Native 更改 iOS 和 Android 文件夹的默认位置

iphone - 从嵌套在 UITabBarController 中的导航 Controller 推送 View Controller ?

ios - 在 iOS 设备上创建可写文件夹

ios - 等待一定时间后向用户发送通知

php - 如何使用 laravel 5 像电子邮件通知一样发出新邮件通知?

ios - 在退出或暂停应用程序时处理推送有效载荷

iOS- Adhoc Builds with Distribution Certification 推送通知出现两次