The WWDC 2013 presentation, What's New in Multitasking, has a section called Alerts Without Sound. It seems straightforward. According to the presentation, if you send an APS payload with a content-only value of 1, users will not be notified of this notification.
My testing shows that this does not work, since no click was received. But if I turn on the sound attribute but exclude the alert attribute, it works (although it is not silent).
// B. This works { aps: { content-available: 1, sound: "default" } }
However, if I change the audio attribute to reproduce a quiet sound, I can simulate a quiet push.
// C. This works too. { aps: { content-available: 1, sound: "silence.wav" } }
Somebody knows:
- If this is a mistake?
- And if you correctly assume that B or C is considered as a remote notification (and not an error with silent push, where do you need the sound attribute)? If so, that means it's not a speed limit like Silent Pushes ... which Apple is likely to fix. Therefore, I probably should not rely on this.
- What is the speed limit (N presses every X seconds, etc.)?
Thanks in advance.
Edit with more information
For A, the state of the application does not matter. A notification is never accepted.
It seems that B and C only work if you include the attributes and values ββin quotation marks, as shown below.
{"aps":{"content-available": 1, "sound":"silent.wav"}}
And the notification comes in the application: didReceiveRemoteNotification: fetchCompletionHandler:, regardless of state.
ios ios7 push-notification
mkwon Oct 08 '13 at 5:26 2013-10-08 05:26
source share