How can I set that device should vibrate if a push notification come to my application?
Turn off Silent Mode & Disable Do Not Disturb Whether you use an iPhone or Android, your phone won't vibrate if it is in Do Not Disturb or Silent mode. If that's the case, you already know what to do: disable both of them. If your phone is in Do Not Disturb or Silent mode, you should see the icons in the status bar.
Tap any app to bring up a list of your currently installed apps. Tap each app on this list that you want to set up a custom notification vibration pattern for, then press the Pick Apps button at the bottom. Press contains anything for an overview of the options you can choose for the custom notification.
I just figured out one way to do this: 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 :-)
I don't think it is possible to instruct the notification to vibrate. If you set a sound using soundName
the notification will vibrate if the iPhone has Vibrate set to ON in Settings > Sounds, i.e. it depends on the settings of the individual iPhone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With