Skip to content
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

This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first. #1002

Closed
BadihBaz opened this issue Feb 26, 2023 · 14 comments
Labels
good first issue Good for newcomers who would like to start contributing to the project. P2 Important issues not at the top of the work list. platform: ios Issue is related to the iOS platform type: bug Something isn't working up for graps Issues marked with this label are relatively easy problems that are ideal for starting contributors.

Comments

@BadihBaz
Copy link

when I call Permision location always the below xcode message
This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first.

@desalutar
Copy link

i have this problem and i don’t know what doing

@MmtDrn
Copy link

MmtDrn commented Mar 23, 2023

DispatchQueue.global().async {
//if you do what you want to do in here you can safe to any app crash
}

@BadihBaz
Copy link
Author

Thank you for your reply.
how to do it on Flutter?

@christinachimi
Copy link

I see this error in my Xcode logs as well. I believe it comes from this plugin. Is there specific information that would be useful in tracking it down and resolving?

@JeroenWeener JeroenWeener added platform: ios Issue is related to the iOS platform type: bug Something isn't working P2 Important issues not at the top of the work list. labels Aug 31, 2023
@JeroenWeener
Copy link
Contributor

There was a similar issue for flutter-geolocator (Baseflow/flutter-geolocator#1293) that was fixed in Baseflow/flutter-geolocator#1265.

If someone wants to contribute, this would be a nice issue to pick up, as one can copy the changes from the geolocator PR.

@JeroenWeener JeroenWeener added good first issue Good for newcomers who would like to start contributing to the project. up for graps Issues marked with this label are relatively easy problems that are ideal for starting contributors. labels Sep 12, 2023
@justinschier
Copy link

Hello, I am getting this warning as well. Hoping someone will fix it soon.

@SouMyth
Copy link

SouMyth commented Nov 8, 2023

same issue persists in iOS 16, need a fix in flutter...

@yasargil
Copy link

yasargil commented Dec 6, 2023

Upvoting

@mohansai1993
Copy link

Anybody fixed this issue?
a few days back [location](location: ^5.0.3) plugin was working fine

/Users/kapilsharma/.pub-cache/hosted/pub.dev/location-5.0.3/ios/Classes/LocationPlugin.m:115 This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first.

Screenshot at Jan 03 14-00-20

@JaveedIshaq
Copy link

This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the-locationManagerDidChangeAuthorization:callback and checkingauthorizationStatus first.

same issue please some one help

@Lazizbek97
Copy link

same issue here.. any solution?

@Spramani
Copy link

This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first.

Screenshot 2024-04-26 at 7 48 03 AM

@jocabedRios
Copy link

Hi!

Anybody has an update?
I used this Lyokone/flutterlocation#789 (comment) and I don't get any warning but my app get stuck.

Thanks!

@honghai2196
Copy link
Contributor

This PR should fix this Xcode warning #1329

honghai2196 added a commit to honghai2196/flutter-permission-handler that referenced this issue May 31, 2024
honghai2196 added a commit to honghai2196/flutter-permission-handler that referenced this issue May 31, 2024
honghai2196 added a commit to honghai2196/flutter-permission-handler that referenced this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers who would like to start contributing to the project. P2 Important issues not at the top of the work list. platform: ios Issue is related to the iOS platform type: bug Something isn't working up for graps Issues marked with this label are relatively easy problems that are ideal for starting contributors.
Projects
None yet
Development

No branches or pull requests