iOS的推送通知 - 如何在不健全的指定警报和徽章? [英] iOS Push Notifications- How to specify alert and badge with NO sound?
问题描述
我想知道如何发送推送通知没有声音。
从<一个href=\"https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html\"相对=nofollow>苹果的网站:
在此文件中的声音播放的警报。如果声音文件
不存在或默认指定为值,默认警报
播放声音。
块引用>这说,如果我使用默认的声音文件,或者如果我指定一个声音文件不存在,它会播放默认的警报声。
但它具体说明如何没有声音......如果我只是不包括在有效载荷(离开它)一声响,将意味着会有任何声音播放?
感谢
解决方案
如果我只是不包括在有效载荷声音(离开它),这将意味着会有任何声音播放?
块引用>这是正确的。只是不包括有效载荷
声音
。或者,甚至不注册声音通知类型,如果你永远也不会想播放声音。I am wondering how to send a Push Notification with NO sound.
From Apple's website:
The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played.
This says that if I use "default" for the sound file or if I specify a sound file that does not exist, it will play the default alert sound.
But it does specifically state how to have no sound... If I just do not include a sound in the payload (leave it out), will this mean that there will be no sound played?
Thanks
解决方案If I just do not include a sound in the payload (leave it out), will this mean that there will be no sound played?
That's right. Just don't include
sound
in the payload. Or, don't even register for sound notification type if you're never going to want to play sounds.这篇关于iOS的推送通知 - 如何在不健全的指定警报和徽章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!