Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

fix iOS returning old location when maximumAge is set #96

Merged
merged 2 commits into from
Dec 15, 2017

Conversation

lini
Copy link
Contributor

@lini lini commented Dec 15, 2017

First, get a timestamp of when the app is started and prevent locations older than that from being returned.
After a recent (after app started) location is aquired, clear the app start timestamp and continue checking the maximumAge to maintain location accuracy.
Remove "location too old" check when timeout is set - proper logic is just to keep waiting for a recent location until timeout expires.

Addresses #78 and #79

First, get a timestamp of when the app is started and prevent locations older than that from being returned.
After a recent (after app started) location is aquired, clear the app start timestamp and continue checking the maximumAge to maintain location accuracy.
Remove "location too old" check when timeout is set - proper logic is just to keep waiting for a recent location until timeout expires.
@ghost ghost assigned lini Dec 15, 2017
@lini lini requested a review from a team December 15, 2017 07:43
@lini lini merged commit 3e9617d into master Dec 15, 2017
@lini lini deleted the lini/fix-ios-old-location branch December 15, 2017 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants