I am writing a sprite-based sprite application quickly and need a short tactile feedback using vibration
so first i imported AudioToolbox and used this
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
and it worked well, but it vibrates too long, and there is no way to control this duration.
Then after some searching, I read Kevin Cao:
Is there an API for custom vibrations in iOS?
but unfortunately, the private AudioServicesPlaySystemSoundWithVibration function was only available in iOS 6.
Is there another way?
ios8 swift vibration
Ahmad Ismail
source share