문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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 :-)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top