I am using the following source code for the iPhone vibrating.But Its not working in iPhone 6s device. Could any one guide me for do this task in ios swift
extension UIDevice {
static func vibrate() {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
}
}
@objc func sos_Tapped(sender: UIButton!) {
UIDevice.vibrate()
}