{"id":15443099,"url":"https://github.com/dariowskii/keychain_wrapper","last_synced_at":"2026-04-22T21:34:07.592Z","repository":{"id":47955154,"uuid":"516433302","full_name":"dariowskii/keychain_wrapper","owner":"dariowskii","description":"a simple KeychainWrapper to get, set, remove any Codable object from Keychain","archived":false,"fork":false,"pushed_at":"2022-09-12T09:38:32.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T03:43:07.180Z","etag":null,"topics":["codable","ios","keychain","keychain-wrapper","swift","swiftui","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dariowskii.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}},"created_at":"2022-07-21T15:52:31.000Z","updated_at":"2022-09-12T10:08:33.000Z","dependencies_parsed_at":"2023-01-18T04:30:23.650Z","dependency_job_id":null,"html_url":"https://github.com/dariowskii/keychain_wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dariowskii/keychain_wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Fkeychain_wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Fkeychain_wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Fkeychain_wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Fkeychain_wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dariowskii","download_url":"https://codeload.github.com/dariowskii/keychain_wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Fkeychain_wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32156603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["codable","ios","keychain","keychain-wrapper","swift","swiftui","wrapper"],"created_at":"2024-10-01T19:33:12.379Z","updated_at":"2026-04-22T21:34:07.575Z","avatar_url":"https://github.com/dariowskii.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keychain_wrapper\n\nA simple KeychainWrapper to get, set, remove any `Codable` object from Keychain!\n\n## Examples\n\nYou can `get` a value in this way:\n```swift\ndo {\n    let myPassword = try KeychainWrapper.shared.get(forKey: \"myPasswordKey\", expecting: String.self)\n} catch {\n    // handle error\n}\n// ...\n// or without handling error\nlet myPassword: String? = KeychainWrapper.shared.get(forKey: \"myPasswordKey\")\n```\n\nYou can `set` a new value for a specific key in this way:\n```swift\nlet myObject: Codable = MyObject()\n\ndo {\n    try KeychainWrapper.shared.set(value: myObject, forKey: \"myObjectKey\")\n} catch {\n    // handle error\n}\n```\n\nYou can `remove` a value for a specific key in this way:\n```swift\ndo {\n    try KeychainWrapper.shared.remove(forKey: \"myObjectKey\")\n} catch {\n    // handle error\n}\n```\n\nYou can remove all the stored values in this way:\n```swift\ndo {\n    try KeychainWrapper.shared.deleteAll()\n} catch {\n    // handle error\n}\n```\n\n## KeychainItem\n\nYou can also use the `KeychainItem` **propertyWrapper** to use the KeychainWrapper quickly and intuitively, in this way:\n```swift\nclass SharedData {\n  static let shared = SharedData()\n  private init() {}\n  \n  @KeychainItem(key: .accessToken)\n  var accessToken: String?\n}\n\n// You can use it like normal variable\nlet myAccessToken = SharedData.shared.accessToken\nSharedData.shared.accessToken = \"mySecretToken\"\n```\n\n---\n\nMade with ❤️ from [dariowskii](https://www.linkedin.com/in/dario-varriale/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariowskii%2Fkeychain_wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdariowskii%2Fkeychain_wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariowskii%2Fkeychain_wrapper/lists"}