I dont know why it is doing it but it makes my app crash?
func locationAuthCheck() {
if CLLocationManager.authorizationStatus() == .authorizedWhenInUse {
// Get the location from the device
currentLocation = locationManager.location
the thread1 error is on if CLLocationManager.authorizationStatus() == .authorizedWhenInUse
func locationAuthCheck() {
if CLLocationManager.authorizationStatus() == .authorizedWhenInUse {
// Get the location from the device
currentLocation = locationManager.location
the thread1 error is on if CLLocationManager.authorizationStatus() == .authorizedWhenInUse