Skip to content

Bugfix: Improve single-shot location fetching - #23

Merged
marcprux merged 2 commits into
skiptools:mainfrom
fhasse95:single-shot-location-fetching
Oct 4, 2026
Merged

marcprux merged 2 commits into
skiptools:mainfrom
fhasse95:single-shot-location-fetching

Conversation

@fhasse95

@fhasse95 fhasse95 commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

This PR improves LocationProvider.fetchCurrentLocation() reliability and performance on both platforms.

On iOS, single-shot location requests are now performed from the main actor and use requestLocation() instead of starting continuous location updates. Recent cached locations are reused when available, avoiding unnecessary delays while still falling back to a fresh location request when the cached location is stale.

On Android, fetchCurrentLocation() similarly checks available last-known locations first and only uses them when they are sufficiently recent. Otherwise, it falls back to a fresh single-shot location request.


Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.
    I used Codex to generate the initial version of the changes, then iteratively refined them myself and manually validated the behavior in my own app, which uses the user's current location.

@cla-bot cla-bot Bot added the cla-signed label Oct 3, 2026
@marcprux
marcprux merged commit 38f1319 into skiptools:main Oct 4, 2026
2 checks passed
@fhasse95
fhasse95 deleted the single-shot-location-fetching branch October 4, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants