iPhone:推送通知有效负载支持哪些警报声音?
我已经实现了推送通知,并且每次都使用默认声音。我知道还有许多其他声音可以使用,但我不知道 Apple 支持推送通知的所有声音的名称。有人可以帮我获取清单吗?
谢谢。
I have implemented Push Notification and have been using Default sounds every time. I know that there are many other sounds as well that I can use but I don't know the names of all sounds that Apple support for Push Notification. Can someone please help me to get the list?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以放置自己喜欢播放的声音文件。
来自苹果文档。
请参阅更多
声音必须与您的应用程序捆绑在一起。
You could put your own sound file , which you like to play.
From apple documentation.
See more
The sound has to be bundled with your app.
您可以使用您想要的任何声音(并且您有权使用) - 但您需要正确编码声音才能在设备上工作(caf、aiff、wav)。您必须将声音作为资源嵌入到项目包中,不能在设备上使用“任何声音”。嵌入后,您可以通过声音负载中的文件名来引用它。
注意 - 您的声音长度必须低于 30 秒,并且没有循环声音的机制)
Apple 推送文档
You can use any sound you desire (and you have the rights to) - but you need to correctly encode the sound to work on the device (caf, aiff, wav). You must embed the sound as a resource within your project bundle, you cannot use "Any sound" on the device. Once embedded, you can reference it by filename in your payload for the sound.
Caveat - your sound must be under 30 seconds long and there is no mechanism to loop the sound)
Apple Push Documentation