我可以下载音频文件并将其用于iOS中的推送通知声音吗?

我可以下载音频文件并将其用于iOS中的推送通知声音吗?,第1张

概述我想下载一个文件并将其存储在我的应用程序中的某个位置,例如NSUserDefaults,然后使用推送通知进行播放. 可能吗?如果是这样,存储此音频文件的最佳位置在哪里? 任何帮助表示赞赏,提前谢谢 是的,你可以做到这一点,但它不是“最好的地方”而是“唯一的地方”:/ Library / Sounds. Here is the appropriate documentation. 特别是这个: Yo 我想下载一个文件并将其存储在我的应用程序中的某个位置,例如NSUserDefaults,然后使用推送通知进行播放.

可能吗?如果是这样,存储此音频文件的最佳位置在哪里?

任何帮助表示赞赏,提前谢谢

解决方法 是的,你可以做到这一点,但它不是“最好的地方”而是“唯一的地方”:/ library / Sounds. Here is the appropriate documentation.

特别是这个:

You can assign the filename of a nonlocalized custom sound in the app’s main bundle (or data container) or you can assign UIlocalnotificationDefaultSoundname to get the default system sound.

还有这个:

For remote notifications in iOS,you can specify a custom sound that iOS plays when it presents a local or remote notification for an app. The sound files can be in the main bundle of the clIEnt app or in the library/Sounds folder of the app’s data container.

总结

以上是内存溢出为你收集整理的我可以下载音频文件并将其用于iOS中的推送通知声音吗?全部内容,希望文章能够帮你解决我可以下载音频文件并将其用于iOS中的推送通知声音吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1048213.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存