summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <friedbunny@users.noreply.github.com>2018-02-16 20:01:03 -0500
committerJason Wray <friedbunny@users.noreply.github.com>2018-02-20 14:23:42 -0500
commit00abd2eaa6dc06cb11a0d24a7128934aea0b9c7d (patch)
tree68258391838fccf989b0ce41139e1ca42d8cb1ba
parent91cd7f5aa9962c9d5a65e1b37abb85d5fe02753e (diff)
downloadqtlocation-mapboxgl-00abd2eaa6dc06cb11a0d24a7128934aea0b9c7d.tar.gz
[ios] Fix loop when first asking for location permission (#11229)
-rw-r--r--platform/ios/CHANGELOG.md4
-rw-r--r--platform/ios/src/MGLMapView.mm3
2 files changed, 6 insertions, 1 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index c11fc63ebd..ab37526573 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -44,6 +44,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Labels are now transliterated from more languages when VoiceOver is enabled. ([#10881](https://github.com/mapbox/mapbox-gl-native/pull/10881))
* Long-pressing the attribution button causes the SDK’s version number to be displayed in the action sheet that appears. ([#10650](https://github.com/mapbox/mapbox-gl-native/pull/10650))
+## 3.7.5
+
+* Fixed an issue where requesting location services permission would trigger an unrecoverable loop. ([#11229](https://github.com/mapbox/mapbox-gl-native/pull/11229))
+
## 3.7.4 - February 12, 2018
* Added the `MGLTileSourceOptionTileCoordinateBounds` option to create an `MGLTileSource` that only supplies tiles within a specific geographic bounding box. ([#11141](https://github.com/mapbox/mapbox-gl-native/pull/11141))
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 927450b511..c8e084795e 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -544,8 +544,9 @@ public:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willTerminate) name:UIApplicationWillTerminateNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sleepGL:) name:UIApplicationDidEnterBackgroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wakeGL:) name:UIApplicationWillEnterForegroundNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sleepGL:) name:UIApplicationWillResignActiveNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wakeGL:) name:UIApplicationDidBecomeActiveNotification object:nil];
+ // As of 3.7.5, we intentionally do not listen for `UIApplicationWillResignActiveNotification` or call `sleepGL:` in response to it, as doing
+ // so causes a loop when asking for location permission. See: https://github.com/mapbox/mapbox-gl-native/issues/11225
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange:) name:UIDeviceOrientationDidChangeNotification object:nil];