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?