diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2018-02-16 20:01:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 20:01:03 -0500 |
commit | 9989e71e3fe436d1a46e0f023adf0218fe777f83 (patch) | |
tree | 38c6c10b1fdb6ab5ea81a13d044974e3b7b2afa5 /platform/ios/src/MGLMapView.mm | |
parent | 3a0c87b1b4d4f2789a2ca5e995a79a7bad4f761f (diff) | |
download | qtlocation-mapboxgl-9989e71e3fe436d1a46e0f023adf0218fe777f83.tar.gz |
[ios] Fix loop when first asking for location permission (#11229)
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index f2141c3840..02f529d094 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -539,8 +539,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]; |