{"id":28214550,"url":"https://github.com/goodrequest/goodpersistence","last_synced_at":"2025-06-11T23:31:40.162Z","repository":{"id":81791975,"uuid":"593150279","full_name":"GoodRequest/GoodPersistence","owner":"GoodRequest","description":"💾 GoodPersistence is an iOS library that simplifies caching data in keychain and UserDefaults. Using a property wrapper, it reduces the complexity of implementing caching mechanisms, making it easier for developers to focus on app functionality. Compatible with latest Swift and supports all iOS devices. Easy to install with SPM.","archived":false,"fork":false,"pushed_at":"2025-02-18T11:04:00.000Z","size":422,"stargazers_count":35,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-04T12:06:16.269Z","etag":null,"topics":["ios","keychain","library","persistence","swift","userdefaults"],"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/GoodRequest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-25T11:04:36.000Z","updated_at":"2025-02-11T07:23:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdb536c4-2c5e-4e22-8f0e-78497fe05404","html_url":"https://github.com/GoodRequest/GoodPersistence","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/GoodRequest/GoodPersistence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodRequest%2FGoodPersistence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodRequest%2FGoodPersistence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodRequest%2FGoodPersistence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodRequest%2FGoodPersistence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoodRequest","download_url":"https://codeload.github.com/GoodRequest/GoodPersistence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodRequest%2FGoodPersistence/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259363037,"owners_count":22846188,"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":["ios","keychain","library","persistence","swift","userdefaults"],"created_at":"2025-05-17T21:08:01.777Z","updated_at":"2025-06-11T23:31:40.138Z","avatar_url":"https://github.com/GoodRequest.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](good-persistence.png)\n\n# GoodPersistence\n\n[![iOS Version](https://img.shields.io/badge/iOS_Version-\u003e=_12.0-brightgreen?logo=apple\u0026logoColor=green)]()\n[![Swift Version](https://img.shields.io/badge/Swift_Version-5.5-green?logo=swift)](https://docs.swift.org/swift-book/)\n[![Supported devices](https://img.shields.io/badge/Supported_Devices-iPhone/iPad-green)]()\n[![Contains Test](https://img.shields.io/badge/Tests-YES-blue)]()\n[![Dependency Manager](https://img.shields.io/badge/Dependency_Manager-SPM-red)](#swiftpackagemanager)\n\nA property wrapper, designed to simplify the process of caching data into the keychain and UserDefaults storage. \nThis wrapper makes it possible to quickly and easily implement caching mechanisms in the applications,\nwithout having to write extensive amounts of code. \nThe property wrapper takes care of all the underlying complexity, allowing developers to focus on their application's functionality.\n\n## Documentation\nYou can check GoodPersistence package documentation [here](https://goodrequest.github.io/GoodPersistence/documentation/goodpersistence/)\n\n## Installation\n### Swift Package Manager\n\nCreate a `Package.swift` file and add the package dependency into the dependencies list.\nOr to integrate without package.swift add it through the Xcode add package interface.\n\n[//]: # (Don't forget to add the version once available)\n```swift\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"SampleProject\",\n    dependencies: [\n        .Package(url: \"https://github.com/GoodRequest/GoodPersistence\" from: \"addVersion\")\n    ]\n)\n\n```\n\n## Usage\n\nStoring to the UserDefaults\n```swift\n@UserDefaultValue(String(describing: AppState.self), defaultValue: .initial)\nvar appState: AppState\n```\n\nStoring to the KeyChain\n```swift\n@KeychainValue(\"accessToken\", defaultValue: \"\", accessibility: .afterFirstUnlockThisDeviceOnly)\nvar accessToken: String\n```\n\nUsing Publishers\n```swift\nlazy var appStatePublisher = _appState.publisher\n    .dropFirst()\n    .removeDuplicates()\n    .eraseToAnyPublisher()\n```\n\n## License\nGoodPersistence is released under the MIT license. See [LICENSE](LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodrequest%2Fgoodpersistence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoodrequest%2Fgoodpersistence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodrequest%2Fgoodpersistence/lists"}