github.com/malcommac/SwiftLocation

SwiftLocation

Async/await aware library to query Core Location services without the delegate ceremony.

Community maintained·Swift·since 2016

In one look

try await location.requestPermission(.whenInUse)
let userLocation = try await location.requestLocation()

Core Location is a delegate-based API designed long before structured concurrency, and most apps only need one thing from it: where am I, once, with this accuracy. Everything else, the permission dance included, is boilerplate that gets copied between projects and slowly diverges.

What it does

  • One-shot or continuous

    Ask where am I once, or subscribe to updates, both through async/await.

  • Permissions in the request

    Authorization is part of the call, with the states you actually have to branch on.

  • Beyond coordinates

    Geocoding, region monitoring and beacon ranging share the same API shape.