flutterlocation icon indicating copy to clipboard operation
flutterlocation copied to clipboard

Fix no location result from getLocation with "Precise Location" off on iOS

Open DennisNoens opened this issue 1 year ago • 4 comments

When "precise location" is turned off on iOS, calling getLocation caused the app to wait indefinitely for a location response.

The root cause is that the guard condition in the code ignores the first two retrieved locations. However, with "precise location" turned off, only one location result seems to be obtained. This means the code never gets past the guard, resulting in no location being returned.

This fix bypasses the guard when "precise location" is off.

Fixes: #892, #815, #748

DennisNoens avatar Aug 15 '24 21:08 DennisNoens

To view this pull requests documentation preview, visit the following URL:

docs.page/lyokone/flutterlocation~984

Documentation is deployed and generated using docs.page.

docs-page[bot] avatar Aug 15 '24 21:08 docs-page[bot]

@Lyokone - Would it be possible to merge this? It seems to fix several issues we are facing using the getLocation() method. Thanks.

bardram avatar Feb 27 '25 09:02 bardram

@Lyokone any hopes on merging this?

ebonke avatar May 05 '25 14:05 ebonke

hello @Lyokone

vietstone-ng avatar May 08 '25 10:05 vietstone-ng