我'm build react native app and I'我希望将通知声音更改为格式mp3中的自定义声音 . 在appcenter docs我读到我需要将新声音添加到Library / Sounds中
声音:当您想播放声音时添加此键 . 此键的值是应用程序主包中或应用程序数据容器的Library / Sounds文件夹中声音文件的名称 . 如果找不到声音文件,或者您为该值指定了默认值,系统将播放默认警报声音 .
在xcode中,当我打开我的项目时,我没有看到任何名为Library或Library / sounds的文件夹 . 我不确定在哪里创建它 . 我有Libraries文件夹,里面有没有任何文件夹的字体 .
1 回答
参考此博客:https://medium.com/@prakashmaharjan20/play-custom-push-notification-sound-ios-a767748a46
您不能将.mp3文件用于ios,您可以使用.caf文件