且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在从FCM接收到iOS 12上的远程推送通知时播放自定义声音

更新时间:2022-04-10 01:46:40

您通过firebase发送的声音名称必须与扩展名为

your sound name that is sent through firebase have to match the name on the sound file with it's extension

还要确保在构建阶段就已在项目中正确实施了文件

also make sure that the files are correctly implemented in the project from build phases

关于默认声音,iOS 10之后不建议通过info.plist更改默认声音名称

regarding the default sound, Changing the default sound name through info.plist is deprecated after iOS 10

https://developer.apple.com/documentation/uikit/uilocalnotificationdefaultsoundname