How to change the duration of vibration in iOS / Swift?

MJQZ1347 picture MJQZ1347 · May 24, 2015 · Viewed 7.8k times · Source

It's possible to make the device vibrate with AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate)). But is there also a way to set the duration of the vibration process? I want it to be shorter.

I thought of stopping the vibration before it fully finishes, e.g. after 0.05 seconds. Is this possible?

Answer