Skip to content

Commit 48faa41

Browse files
committed
Refactor the fix
1 parent 17b4a61 commit 48faa41

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Sources/MapboxNavigation/NavigationMapView+CLLocationManagerDelegate.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@ extension NavigationMapView: CLLocationManagerDelegate {
66
if !_locationChangesAllowed { return }
77
authorizationStatus = status
88
}
9-
9+
10+
@available(iOS 14.0, *)
1011
public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
1112
// In case if location changes are not allowed - do not update authorization status and
1213
// accuracy authorization. Used for testing.
1314
if !_locationChangesAllowed { return }
14-
15-
if #available(iOS 14.0, *) {
16-
authorizationStatus = manager.authorizationStatus
17-
accuracyAuthorization = manager.accuracyAuthorization
18-
} else {
19-
authorizationStatus = CLLocationManager.authorizationStatus()
20-
}
15+
16+
authorizationStatus = manager.authorizationStatus
17+
accuracyAuthorization = manager.accuracyAuthorization
2118
}
2219
}

0 commit comments

Comments
 (0)