Background location alert with vibration?

322 Views Asked by At

I tried to use the method

AudioServicesPlayAlertSound(kSystemSoundID_Vibrate)
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)

to trigger vibration when the method

 func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
}

is called.

However, I found that the vibration never be triggered unless the app is at the foreground.

Any method to do this?

0

There are 0 best solutions below