{"id":18060758,"url":"https://github.com/0xleif/locationcachestore","last_synced_at":"2025-04-05T12:25:54.830Z","repository":{"id":48026444,"uuid":"516171842","full_name":"0xLeif/LocationCacheStore","owner":"0xLeif","description":"CoreLocation Store using CacheStore","archived":false,"fork":false,"pushed_at":"2022-07-22T01:51:01.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T23:41:48.922Z","etag":null,"topics":["cachestore","cllocation","corelocation","swift","swiftui"],"latest_commit_sha":null,"homepage":"https://github.com/0xOpenBytes/CacheStore","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xLeif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-21T00:19:27.000Z","updated_at":"2022-07-22T01:51:18.000Z","dependencies_parsed_at":"2022-09-11T22:23:50.868Z","dependency_job_id":null,"html_url":"https://github.com/0xLeif/LocationCacheStore","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FLocationCacheStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FLocationCacheStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FLocationCacheStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FLocationCacheStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xLeif","download_url":"https://codeload.github.com/0xLeif/LocationCacheStore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247335042,"owners_count":20922338,"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":["cachestore","cllocation","corelocation","swift","swiftui"],"created_at":"2024-10-31T04:10:24.355Z","updated_at":"2025-04-05T12:25:54.801Z","avatar_url":"https://github.com/0xLeif.png","language":"Swift","readme":"# LocationCacheStore\n\n*CoreLocation State Store*\n\n## What is [`CacheStore`](https://github.com/0xOpenBytes/CacheStore)?\n\n`CacheStore` is a SwiftUI state management framework that uses a dictionary as the state. Scoping creates a single source of truth for the parent state. `CacheStore` uses [`c`](https://github.com/0xOpenBytes/c), which a simple composition framework. [`c`](https://github.com/0xOpenBytes/c) has the ability to create transformations that are either unidirectional or bidirectional.\n\n## LocationStore\n```swift\npublic typealias LocationStore = Store\u003cLocationStoreKey, LocationStoreAction, LocationStoreDependency\u003e\n```\n\n## Keys\n```swift\n/// `LocationStore` Keys\n///     - location: CLLocation\npublic enum LocationStoreKey {\n    case location // CLLocation\n}\n```\n\n## Actions\n```swift\n/// `LocationStore` Actions\npublic enum LocationStoreAction {\n    case updateLocation\n    case locationUpdated(CLLocation?)\n}\n```\n\n## Dependency\n```swift\n/// `LocationStore` Dependency\npublic struct LocationStoreDependency {\n    public var shouldContinuouslyUpdate: Bool\n    public var updateLocation: () async -\u003e CLLocation?\n    \n    public init(\n        shouldContinuouslyUpdate: Bool = true,\n        updateLocation: @escaping () async -\u003e CLLocation?\n    ) {\n        self.shouldContinuouslyUpdate = shouldContinuouslyUpdate\n        self.updateLocation = updateLocation\n    }\n}\n```\n\n## StoreActionHandler\n```swift\n/// Higher-order StoreActionHandler\npublic func locationStoreActionHandler(\n    withActionHandler actionHandler: StoreActionHandler\u003cLocationStoreKey, LocationStoreAction, LocationStoreDependency\u003e? = nil\n) -\u003e StoreActionHandler\u003cLocationStoreKey, LocationStoreAction, LocationStoreDependency\u003e\n```\n\n## DefaultLocationStore\n```swift\npublic class DefaultLocationStore: LocationStore\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xleif%2Flocationcachestore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xleif%2Flocationcachestore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xleif%2Flocationcachestore/lists"}