How to set the size of the vibrating alert iPhone?

I use AudioServicesPlaySystemSound to make a vibration call:

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); 

Is there a way to set the duration of the vibration? I know that the default duration is 0.4 seconds, but sometimes I need to make the device vibrate less or more time than this.

+2
source share
3 answers

You can use these numbers for less vibration.

 AudioServicesPlaySystemSound(1519); // Weak AudioServicesPlaySystemSound(1520); // Strong 

You can combine two to three vibrations for a longer duration of vibration.

+4
source

I do not think that it is possible to change this duration of vibration. Even if you achieve this using some library, but I do not think that Apple will be happy in this. There is a chance that your application will be rejected.

+2
source

You are not allowed to change the duration of the vibration. If you want more, you will have to configure it so that it starts to vibrate immediately after the first completion, but Apple, as you know, rejected this.

+2
source

All Articles