使用自定义声音解析推送通知播放默认声音 [英] Parse Push Notification with custom sound plays default sound

查看:23
本文介绍了使用自定义声音解析推送通知播放默认声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发送了应用收到的解析推送通知,但请求的声音没有播放,而是播放默认声音.声音已由应用程序保存在文档文件夹中.我可以在 iTunes 中检查它们是否在那里.在某些时候这是有效的,但由于某种原因它已停止播放请求的声音.如果我记录推送通知用户信息字典,声音名称是正确的:

I send a parse push notification which the app receives, but the sound requested does not play, instead the default sound plays. The sounds have been saved by the app in the documents folder. I can check in iTunes that they are there. At some point this was working, but for some reason it has stopped playing the requested sounds. If I log the push notification user info dictionary the sound name is correctly there:

2015-01-11 12:17:41.356 My App[239:60b] didReceiveRemoteNotification, userInfo: {
    aps =     {
        alert = "XXX says FOO from the console!";
        sound = "w8nmridutW_v1.mp3";
    };
}

有什么想法吗?

推荐答案

可能不支持您使用的音频格式.它在工作时是不同的文件吗?检查 苹果文档.

It is possible that the audio format that you use is not supported. Was it a different file when it was working ? Check with the apple documentation.

这篇关于使用自定义声音解析推送通知播放默认声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆