gpt4 book ai didi

ios - 推送通知声音不起作用

转载 作者:行者123 更新时间:2023-11-28 21:54:00 26 4
gpt4 key购买 nike

我在我的应用程序中使用推送通知。当通知出现时,我没有收到通知的通知声音,而且在 iPad 设置中我打开了 iPad 中的所有通知按钮,即使通知声音没有出现。

{
alert = "Testing commands@2014-12-01T12:16:26",
sound = "default"
}

我正在获取这样的声音文件。但是没有通知声音。

我是 PushNotification 概念的新手。任何人都可以帮助解决这个问题......

最佳答案

您应该使用 JSON 格式发送封装在 aps 字典中的通知,例如:

{

"aps" : {

"alert" : "Your message.",

"badge" : 0,

"sound" : "default"

}
}

完整引用: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

关于ios - 推送通知声音不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27246377/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com