Platform: iOS (only on Device not in Simulator)
Mapbox SDK version: 3.7.4
NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription in its Info.plist.MGLMapView.showsUserLocation to true.When a user opens the map the first time I want the popup Allow "AppName" to access your location? to appear exactly once.
When a user opens the map the first time the popup Allow "AppName" to access your location? appears in an infinite loop and I cannot tap any button like Only While Using the App, Always Allows or Don't Allow. The popup is visible for about 1 second and then reappears.
Downgrading to version 3.7.3 solves the issue on our devices.

A few questions:
NSLocationAlwaysUsageDescription or NSLocationAlwaysAndWhenInUseUsageDescription? Both?CLLocationManager that could be requesting permission?Hi @friedbunny thanks for taking such a quick look on that issue. To your questions:
NSLocationAlwaysUsageDescription and NSLocationAlwaysAndWhenInUseUsageDescription are specified.CLLocationManager. The App also uses Firebase SDK which might use CLLocationManager in their SDK but this is only a hypothesis.@rweindl Hrm, so I can鈥檛 reproduce this 鈥斅爊either by enabling showsUserLocation in viewDidLoad nor in a storyboard, with any combination of usage descriptions.
Oh, and if you have a test app that you can share that鈥檇 be greatly appreciated. 馃檱
I can reproduce this with the Mapbox Studio Preview app.

Hi @friedbunny I created a small test project for you illustrating this behavior. The only dependency is Mapbox 3.7.4. One note: The home button seems no longer to work as soon this behavior starts.
pod installMGLMapboxAccessToken in the Info.plist
Thanks for your help @rweindl and @captainbarbosa 鈥斅爐his is happening because #11151 re-added a listener for UIApplicationWillResignActiveNotification in 3.7.4.
After a bit of preliminary digging, it looks like this is the sequence of events leading to the loop:
UIApplicationWillResignActiveNotification when the permission dialog appears.sleepGL:, which disables location services.UIApplicationDidBecomeActiveNotification and calls wakeGL:, which re-enables location services and asks for permission.The quick fix would be to just remove the listener for UIApplicationWillResignActiveNotification (which we鈥檝e evidently judged to be unnecessary in the past: https://github.com/mapbox/mapbox-gl-native/pull/2988), but perhaps we should also reevaluate wakeGL:/sleepGL:.
/cc @julianrex @1ec5 @akitchen @lilykaiser
Thanks for identifying the issue that quickly and keeping us in the loop! We're using 3.7.3 in the meantime.
Fixed by #11229, which is now available in Mapbox Maps SDK for iOS 3.7.5. Thanks again for reporting this issue and helping us fix it, @rweindl. 馃檱
Most helpful comment
Fixed by #11229, which is now available in Mapbox Maps SDK for iOS 3.7.5. Thanks again for reporting this issue and helping us fix it, @rweindl. 馃檱