A lightweight async/await wrapper for Apple's CoreLocation framework, replacing delegates and completion blocks with modern Swift syntax.
SwiftLocation is a Swift library that wraps Apple's CoreLocation framework with async/await support. It simplifies location-based operations by replacing traditional delegate patterns and completion handlers with modern Swift concurrency, allowing developers to write cleaner, more readable code for permissions, one-shot location requests, and continuous monitoring.
iOS, macOS, watchOS, and tvOS developers building apps that require location services, such as mapping, tracking, geofencing, or beacon-based features.
Developers choose SwiftLocation for its seamless integration with Swift's async/await, eliminating callback hell and delegate boilerplate. It offers a consistent, type-safe API across all Apple platforms while maintaining full CoreLocation functionality.
⚓️ Async/Await CLLocationManager Wrapper for Apple Platforms
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates delegate patterns and completion blocks by using native Swift concurrency, as shown in the two-line code example for fetching user location, making code cleaner and more maintainable.
Reduces boilerplate with minimal code for common tasks, such as requesting permissions and location, demonstrated in the quick start snippet that replaces complex CoreLocation setups.
Supports various CoreLocation features like visits, heading, and beacon ranging via AsyncStream, providing a unified approach for different monitoring needs without manual stream management.
Works across iOS, macOS, watchOS, and tvOS with a consistent API, ensuring developers can use the same codebase for location services on all Apple platforms.
Includes a mocked CLLocationManager for unit testing, allowing easy simulation of location events and errors, as mentioned in the testing suite section of the README.
Version 6.0 lacks geocoding, IP resolve, and autocomplete from previous releases, requiring separate modules for full functionality, which adds complexity for apps needing these features.
Requires adoption of async/await, making it unsuitable for teams not yet migrated to modern Swift or those using alternative concurrency models, as it fully embraces this paradigm.
As a complete rewrite in v6.0, migrating from older versions could involve significant code refactoring, noted in the 'What's new' section, which may disrupt existing projects.