-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[iOS] Geolocation Accuracy and Cached Location Bug #6198
Conversation
By analyzing the blame information on this pull request, we identified @nicklockwood, @brentvatne and @zjj010104 to be potential reviewers. |
Does this line need to updated to reflect your changes? |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
49b2805
@christopherdro |
Summary:There are two issues: 1. When calling startObserving or getCurrentPosition for the first time, _locationManager is not initialized and the accuracy value set in options is lost. 2. When using the cached location _lastLocationEvent, current timestamp retrieved by CFAbsoluteTimeGetCurrent() is from 2001, but the timestamp of the location is from 1970. In addition, the comparison between _lastLocationEvent[@"coords"][@"accuracy"] and options.accuracy is incorrect. Less value indicates more accurate location. Closes facebook#6198 Differential Revision: D3023786 Pulled By: nicklockwood fb-gh-sync-id: 869c0e34252470275bf99cf0e5861747247f1158 shipit-source-id: 869c0e34252470275bf99cf0e5861747247f1158
Summary:There are two issues: 1. When calling startObserving or getCurrentPosition for the first time, _locationManager is not initialized and the accuracy value set in options is lost. 2. When using the cached location _lastLocationEvent, current timestamp retrieved by CFAbsoluteTimeGetCurrent() is from 2001, but the timestamp of the location is from 1970. In addition, the comparison between _lastLocationEvent[@"coords"][@"accuracy"] and options.accuracy is incorrect. Less value indicates more accurate location. Closes facebook#6198 Differential Revision: D3023786 Pulled By: nicklockwood fb-gh-sync-id: 869c0e34252470275bf99cf0e5861747247f1158 shipit-source-id: 869c0e34252470275bf99cf0e5861747247f1158
Summary:There are two issues: 1. When calling startObserving or getCurrentPosition for the first time, _locationManager is not initialized and the accuracy value set in options is lost. 2. When using the cached location _lastLocationEvent, current timestamp retrieved by CFAbsoluteTimeGetCurrent() is from 2001, but the timestamp of the location is from 1970. In addition, the comparison between _lastLocationEvent[@"coords"][@"accuracy"] and options.accuracy is incorrect. Less value indicates more accurate location. Closes facebook#6198 Differential Revision: D3023786 Pulled By: nicklockwood fb-gh-sync-id: 869c0e34252470275bf99cf0e5861747247f1158 shipit-source-id: 869c0e34252470275bf99cf0e5861747247f1158
There are two issues: