{"id":13340096,"url":"https://github.com/gilzoide/unity-key-value-store-apple-keychain","last_synced_at":"2026-01-30T13:04:51.593Z","repository":{"id":230571275,"uuid":"779437881","full_name":"gilzoide/unity-key-value-store-apple-keychain","owner":"gilzoide","description":"Key-Value Store implementation for Unity backed by macOS/iOS/tvOS/visionOS Keychain services","archived":false,"fork":false,"pushed_at":"2024-03-31T22:55:50.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T21:23:17.471Z","etag":null,"topics":["apple","ios","key-value","key-value-store","keychain","keychain-services","macos","tvos","unity","unity2d","unity3d","upm","upm-package","visionos"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gilzoide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["gilzoide"],"patreon":null,"open_collective":null,"ko_fi":"gilzoide","tidelift":null,"community_bridge":null,"liberapay":"gilzoide","issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-03-29T20:54:34.000Z","updated_at":"2024-04-11T08:19:37.000Z","dependencies_parsed_at":"2024-10-10T10:40:21.747Z","dependency_job_id":null,"html_url":"https://github.com/gilzoide/unity-key-value-store-apple-keychain","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"3bf3767b63f037b606a354e91342f5b809ac0f59"},"previous_names":["gilzoide/unity-key-value-store-apple-keychain"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gilzoide/unity-key-value-store-apple-keychain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilzoide%2Funity-key-value-store-apple-keychain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilzoide%2Funity-key-value-store-apple-keychain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilzoide%2Funity-key-value-store-apple-keychain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilzoide%2Funity-key-value-store-apple-keychain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilzoide","download_url":"https://codeload.github.com/gilzoide/unity-key-value-store-apple-keychain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilzoide%2Funity-key-value-store-apple-keychain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259440424,"owners_count":22857918,"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":["apple","ios","key-value","key-value-store","keychain","keychain-services","macos","tvos","unity","unity2d","unity3d","upm","upm-package","visionos"],"created_at":"2024-07-29T19:22:07.619Z","updated_at":"2026-01-30T13:04:46.571Z","avatar_url":"https://github.com/gilzoide.png","language":"C#","funding_links":["https://github.com/sponsors/gilzoide","https://ko-fi.com/gilzoide","https://liberapay.com/gilzoide"],"categories":[],"sub_categories":[],"readme":"# Apple Keychain Key-Value Store for Unity\n[![openupm](https://img.shields.io/npm/v/com.gilzoide.key-value-store.apple-keychain?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gilzoide.key-value-store.apple-keychain/)\n\n[Key-Value Store](https://github.com/gilzoide/unity-key-value-store) implementation backed by macOS / iOS / tvOS / visionOS [Keychain Services](https://developer.apple.com/documentation/security/keychain_services).\n\n\n## Features\n- [GenericPasswordKeychainItemKeyValueStore](Runtime/GenericPasswordKeychainItemKeyValueStore.cs): Key-Value Store implementation that stores data into a Generic Password Keychain Item.\n  Value data is stored as a `NSMutableDictionary` and serialized using `NSKeyedArchiver`.\n- Supports the following Keychain Item attributes:\n  + [Account](https://developer.apple.com/documentation/security/ksecattraccount)\n  + [Service](https://developer.apple.com/documentation/security/ksecattrservice)\n  + [Access Group](https://developer.apple.com/documentation/security/ksecattraccessgroup): allows accessing shared keychain groups\n  + [Label](https://developer.apple.com/documentation/security/ksecattrlabel)\n  + [Description](https://developer.apple.com/documentation/security/ksecattrdescription)\n  + [Synchronizable](https://developer.apple.com/documentation/security/ksecattrsynchronizable): synchronization with iCloud\n  + [Use Data Protection Keychain](https://developer.apple.com/documentation/security/ksecusedataprotectionkeychain): only relevant on macOS\n\n\n## Dependencies\n- [Key-Value Store](https://github.com/gilzoide/unity-key-value-store): interface used by this implementation, which also provides custom object serialization out of the box.\n\n\n## How to install\nEither:\n- Use the [openupm registry](https://openupm.com/) and install this package using the [openupm-cli](https://github.com/openupm/openupm-cli):\n  ```\n  openupm add com.gilzoide.key-value-store.apple-keychain\n  ```\n- Install using the [Unity Package Manager](https://docs.unity3d.com/Manual/upm-ui-giturl.html) with the following URL:\n  ```\n  https://github.com/gilzoide/unity-key-value-store-apple-keychain.git#1.0.0-preview4\n  ```\n- Clone this repository or download a snapshot of it directly inside your project's `Assets` or `Packages` folder.\n\n\n## Basic usage\n```cs\nusing Gilzoide.KeyValueStore.AppleKeychain;\nusing UnityEngine;\n\n// 1. Instantiate a GenericPasswordKeychainItemKeyValueStore with the Keychain Item attributes\nvar keychainItemAttributes = new GenericPasswordKeychainAttributes\n{\n    Service = Application.identifier,\n    Description = \"Small secrets used by the game\",\n    IsSynchronizable = true,  // synchronizable with iCloud\n};\n\nvar kvs = new GenericPasswordKeychainItemKeyValueStore(keychainItemAttributes);\n\n\n// 2. Set/Get/Delete values\nkvs.SetBool(\"finishedTutorial\", true);\nkvs.SetString(\"username\", \"gilzoide\");\n\nDebug.Log(\"Checking if values exist: \" + kvs.HasKey(\"username\"));\nDebug.Log(\"Getting values: \" + kvs.GetInt(\"username\"));\nDebug.Log(\"Getting values with fallback: \" + kvs.GetString(\"username\", \"default username\"));\n// Like C# Dictionary, this idiom returns a bool if the key is found\nif (kvs.TryGetString(\"someKey\", out string foundValue))\n{\n    Debug.Log(\"'someKey' exists: \" + foundValue);\n}\n\nkvs.DeleteKey(\"someKey\");\n\n\n// 3. Save the updated data into the keychain\nkvs.Save();\n\n\n// 4. Dispose of the GenericPasswordKeychainItemKeyValueStore when done\n// This ensures the native data gets released correctly\nkvs.Dispose();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilzoide%2Funity-key-value-store-apple-keychain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilzoide%2Funity-key-value-store-apple-keychain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilzoide%2Funity-key-value-store-apple-keychain/lists"}