mapbox-maps-ios
mapbox-maps-ios copied to clipboard
CoreLocation - This method can cause UI unresponsiveness
Environment
- Xcode version: Beta 3
- iOS version: 16
- Devices affected:
- Maps SDK Version: 10.6.0
Observed behavior and steps to reproduce
Behavior normal, but get a warning from the console.
"/Users/distiller/project/Sources/MapboxMobileEvents/MMEEventsManager.m:356: warning run: This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization:
callback and checking authorizationStatus
first."
Additional links and references
See Image Below

@jhoanarango, can you provide additional information/ a code snippet of what is happening in your code when you receive that message?
Hello,
So there is not code snippet that I can't point to from my code, however following this trace it leads me to MapBox's EventsManager.sendTurnstile(). I will post screenshots here, since it seems is the best way to show you. Also, I am on XCode Beta 5 now.

@jhoanarango Were you able to find a fix for it? I'm seeing the exact same thing as you. CC: ZiZasaurus
@srinivaskasala , hey sorry I didn't answer earlier. But not, till this day I have not been able to do anything about this. I think this is more on the MapBox side. They should take a look since I do not have access.
@jhoanarango @srinivaskasala Here is the PR with the fix: https://github.com/mapbox/mapbox-events-ios/pull/344 It was released as part of MapsSDK 10.8. There are some cases when you still can see this issue but I can assure you that aside from the Xcode warning, this problem has no impact on the stability of the SDK. It was blocking the main thread for a small amount of time, but it happens only during the MapView initialization as you can see from the stack trace, so it doesn't affect the map after it has been created.
@azarovalex, thank you for the update. Will update to the latest SDK.
I am running 10.8.1 with iOS 16 and I get this warning every time the MapView initializes.
Same issue on my side with 10.8.1:

Hi, I observe the same runtime warning as @Adraesh on 10.8.1.

This warning is addressed in v10.9.0.
I AM GETTING THE SAME ERROR, WHY DID YOU CLOSE THE ISSUE???