Question

I want the phone to vibrate more than once on incoming push notifications.

To realize this behavior I scheduled several text-less local notifications (after 1 second, 2 seconds, ...) in the application:didReceiveRemoteNotification:fetchCompletionHandler: method.

This works well on the device that I use for development and several other phones, but it doesn't work on all of them.

What can I do to make it work on all devices?

Was it helpful?

Solution

Since iOS looks a how you app handles application:didReceiveRemoteNotification:fetchCompletionHandler: it may or may not call that method. If a user has disabled background updating then the method is never called.

Since you are misusing this API for something it is not intended there will be no way to make work on all devices.

OTHER TIPS

If you want to phone to only vibrate on receipt of a push notification, you need to have a silent sound file in your application bundle, for example "silence.aif" ...

if you specify that sound file in the APS notification, the iOS device will "play" the silence.aif from your application bundle, but since the sound is silence, there is nothing to hear. However the notification vibration is still triggered :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top