-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Permissions.RequestAsync<Premissions.LocationWhenInUse> is getting main thread warnings - fix #29180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the main thread warnings in Permissions.RequestAsync for iOS by removing the call to EnsureMainThread() in the tvOS/watchOS/iOS implementation.
- Removed an explicit main thread check that was causing warnings
- Proceeds directly to RequestLocationAsync for location authorization requests
Comments suppressed due to low confidence (1)
src/Essentials/src/Permissions/Permissions.ios.tvos.watchos.cs:137
- Removing EnsureMainThread() resolves the main thread warnings, but please double-check that RequestLocationAsync correctly handles any required main-thread operations to avoid potential issues with UI-related permission requests.
EnsureMainThread();
Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Do we have an idea why it was there in the first place @mattleibow @jfversluis ? |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
I am not sure why tbh, it may have been a defensive thing. We should probably test this tho on older OS versions. Might have been something on older devices because it uses UI. |
Issues Fixed
Fixes #29172