{"id":1238,"url":"https://github.com/AsyncSwift/AsyncLocationKit","last_synced_at":"2025-08-06T14:31:06.373Z","repository":{"id":37989960,"uuid":"443767779","full_name":"AsyncSwift/AsyncLocationKit","owner":"AsyncSwift","description":"📍async/await CoreLocation ","archived":false,"fork":false,"pushed_at":"2023-10-06T19:42:49.000Z","size":129,"stargazers_count":172,"open_issues_count":1,"forks_count":25,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-28T20:39:12.536Z","etag":null,"topics":["async-await","concurency","framework","location","location-service","swift","swiftpackage","swiftpackagemanager"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsyncSwift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-01-02T13:04:53.000Z","updated_at":"2024-04-28T20:39:12.536Z","dependencies_parsed_at":"2024-01-02T20:58:37.542Z","dependency_job_id":"f7e66013-d16a-4138-8bf9-ad50e09dd4bd","html_url":"https://github.com/AsyncSwift/AsyncLocationKit","commit_stats":{"total_commits":70,"total_committers":8,"mean_commits":8.75,"dds":0.4714285714285714,"last_synced_commit":"e70b5dcc8bbacb154dc8e6888cac7f9bd94a0f13"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncSwift%2FAsyncLocationKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncSwift%2FAsyncLocationKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncSwift%2FAsyncLocationKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncSwift%2FAsyncLocationKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsyncSwift","download_url":"https://codeload.github.com/AsyncSwift/AsyncLocationKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":215780271,"owners_count":15929791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","concurency","framework","location","location-service","swift","swiftpackage","swiftpackagemanager"],"created_at":"2024-01-05T20:15:41.955Z","updated_at":"2024-08-17T16:31:01.918Z","avatar_url":"https://github.com/AsyncSwift.png","language":"Swift","readme":"# AsyncLocationKit\n\n[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat)\n[![Swift](https://img.shields.io/badge/Swift-5.5-orange?style=flat)](https://img.shields.io/badge/Swift-5.5-Orange?style=flat)\n[![Platforms](https://img.shields.io/badge/platforms-iOS--13%20|%20macOS(beta)%20|%20watchOS--6(beta)%20|%20tvOS(beta)-orange?style=flat)](https://img.shields.io/badge/platforms-iOS--13%20|%20macOS(beta)%20|%20watchOS--6(beta)%20|%20tvOS(beta)-orange?style=flat)\n\nWrapper for Apple `CoreLocation` framework with new Concurrency Model. No more `delegate` pattern or `completion blocks`.\n\n### Install\n---\n##### SPM\n```swift\ndependencies: [\n    .package(url: \"https://github.com/AsyncSwift/AsyncLocationKit.git\", .upToNextMinor(from: \"1.6.4\"))\n]\n```\n\n#### Cocoapods\n```\npod 'AsyncLocationKit', :git =\u003e 'https://github.com/AsyncSwift/AsyncLocationKit.git', :tag =\u003e '1.6.4'\n```\n\n\n:warning: **Initialize AsyncLocationManager only synchronously on MainThread**\n\n```swift\nimport AsyncLocationKit\n\nlet asyncLocationManager = AsyncLocationManager(desiredAccuracy: .bestAccuracy)\n\nlet permission = await self.asyncLocationManager.requestAuthorizationWhenInUse() //returns CLAuthorizationStatus\n```\n\nYou can use all methods from Apple `CLLocationManager`.\n\n```swift\nlet coordinate = try await asyncLocationManager.requestLocation() //Request user location once\n```\n\nStart monitoring update of user location with `AsyncStream`.\n\n```swift\nfor await locationUpdateEvent in await asyncLocationManager.startUpdatingLocation() {\n    switch locationUpdateEvent {\n    case .didUpdateLocations(let locations):\n        // do something\n    case .didFailWith(let error):\n        // do something\n    case .didPaused, .didResume: \n        break\n    }\n}\n```\n\nIf `Task` was cancelled, Stream finished automaticaly.\n","funding_links":[],"categories":["Hardware","Libs"],"sub_categories":["Location"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAsyncSwift%2FAsyncLocationKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAsyncSwift%2FAsyncLocationKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAsyncSwift%2FAsyncLocationKit/lists"}