title: Custom vibration in iOS 8 - Swift
body: <p>I'm writing a sprite kit-based app in swift and need to make a short haptic feedback using vibration</p>
  
  <p>so first I imported AudioToolbox and used this</p>
  
  <pre><code>AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
  </code></pre>
  
  <p>and it worked well but it vibrates for too long and there's no way to control this duration.</p>
  
  <p>Then after some searching I read Kevin Cao's answer here:</p>
  
  <p><a href="https://stackoverflow.com/questions/12966467/are-there-apis-for-custom-vibrations-in-ios">Are there APIs for custom vibrations in iOS?</a></p>
  
  <p>but unfortunately AudioServicesPlaySystemSoundWithVibration private function was only usable in iOS 6.</p>
  
  <p>so is there any other possible way?</p>