iphonecocoa-touchiphone-vibrate

how to increase the vibration time in iPhone


I am using following method to vibrate the device

 AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);

But this vibrate for a very shor period of time can we increase this period ?


Solution

  • You cannot change vibration duration with official APIs.

    You could call AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); multiple times in a loop or using a NSTimer, but that is not recommended. It drains battery and the device could fall off the table.

    By the way, Apple could reject your app if they consider you don't use the vibrate properly.