本文介绍了iPhone推送通知自定义音效,在静默模式下无震动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我有推送通知的工作细到我的自定义声音的应用程序。然而,当我iPhone处于静音模式,我发送推送通知了自定义的声音,声音显然不玩了,但也没有震动。

So, I have Push Notifications working fine to my app with Custom Sounds. However, when my iPhone is in silent mode, and I send a push notification with a custom sound, the sound obviously does not play, but there is also no vibration.

如果我发送推送通知具有健全=磬或不存在类似的东西,iPhone的短信通知声音播放预期,并且在无声的电话,其振动,符合市场预期。

If I send a push notification with a sound="chime" or something that doesn't exist like that, the iPhone's SMS notification sound plays as expected, and in silent phone, it vibrates, as expected.

我在做什么错在这里?

推荐答案

在万一别人运行到这一点,我想通了最后。

In case anyone else runs into this, I figured it out finally.

这实际上是苹果的结束。如果你发出一个声音推送通知,只有徽章,但没有文字的提醒,它会播放声音,如果你的手机不是处于静音模式,但是如果它在静音模式时,将不播放声音。

It's actually on Apple's end. If you send out a push notification with a sound, and badge only, but no text alert, it will play the sound if your phone is not in silent mode, however it will NOT play the sound if it IS in silent mode.

现在,如果你添加一个文本警惕该通知,它播放的声音很好,即便在振动模式。

Now, if you add a text alert to that notification, it plays the sound fine, even while in vibrate mode.

有可能会出现一些更多的测试解决此工作要做。例如:如果你发送自定义键/值对不发挥它的声音呢?不知道。

There may be some more testing to be done around this. Eg: if you send custom key/value pairs does it play the sound then? Not sure.

这篇关于iPhone推送通知自定义音效,在静默模式下无震动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 19:23