Skip to content

Commit eb5b913

Browse files
authored
Merge pull request #4114 from mapbox/azarovalex/ios13-fix
Fix location authorization on iOS 13 and lower
2 parents 1b046e6 + e58c878 commit eb5b913

File tree

58 files changed

+19
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+19
-8
lines changed

.circleci/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,14 @@ workflows:
798798
codecoverage: false
799799
context: Slack Orb
800800
configuration: "Release"
801+
- build-job:
802+
name: "Xcode_13.4.1_iOS_13.7"
803+
xcode: "13.4.1"
804+
iOS: "13.7"
805+
device: "iPhone 11 Pro Max"
806+
spm: true
807+
codecoverage: false
808+
context: Slack Orb
801809
- pod-job:
802810
name: "Xcode_13.2.1_iOS_15.2_CP_install"
803811
update: false

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import CoreLocation
22

33
extension NavigationMapView: CLLocationManagerDelegate {
4-
4+
5+
public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
6+
if !_locationChangesAllowed { return }
7+
authorizationStatus = status
8+
}
9+
10+
@available(iOS 14.0, *)
511
public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
612
// In case if location changes are not allowed - do not update authorization status and
713
// accuracy authorization. Used for testing.
814
if !_locationChangesAllowed { return }
9-
10-
if #available(iOS 14.0, *) {
11-
authorizationStatus = manager.authorizationStatus
12-
accuracyAuthorization = manager.accuracyAuthorization
13-
} else {
14-
authorizationStatus = CLLocationManager.authorizationStatus()
15-
}
15+
16+
authorizationStatus = manager.authorizationStatus
17+
accuracyAuthorization = manager.accuracyAuthorization
1618
}
1719
}
66.9 KB
7.92 KB
7.78 KB

0 commit comments

Comments
 (0)