{"id":28435167,"url":"https://github.com/skiptools/skip-keychain","last_synced_at":"2025-10-24T01:58:10.815Z","repository":{"id":244937384,"uuid":"816765385","full_name":"skiptools/skip-keychain","owner":"skiptools","description":"Secure key/value storage for Skip apps","archived":false,"fork":false,"pushed_at":"2025-10-01T21:36:31.000Z","size":63,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-01T23:28:11.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skiptools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.LGPL","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-18T11:11:21.000Z","updated_at":"2025-10-01T21:36:35.000Z","dependencies_parsed_at":"2024-08-15T20:03:41.700Z","dependency_job_id":"cba2156e-b32d-4d40-908b-d9921d33701b","html_url":"https://github.com/skiptools/skip-keychain","commit_stats":null,"previous_names":["skiptools/skip-keychain"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/skiptools/skip-keychain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skiptools%2Fskip-keychain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skiptools%2Fskip-keychain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skiptools%2Fskip-keychain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skiptools%2Fskip-keychain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skiptools","download_url":"https://codeload.github.com/skiptools/skip-keychain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skiptools%2Fskip-keychain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280723927,"owners_count":26380108,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-05T20:06:49.892Z","updated_at":"2025-10-24T01:58:10.810Z","avatar_url":"https://github.com/skiptools.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SkipKeychain\n\nThis is a [Skip](https://skip.tools) Swift/Kotlin library project providing a simple unified API to secure key/value storage. It uses the Keychain on Darwin platforms and `EncyptedSharedPreferences` on Android.\n\n\u003cdiv align=\"center\"\u003e\n\u003cvideo id=\"intro_video\" style=\"height: 500px;\" autoplay muted loop playsinline\u003e\n  \u003csource style=\"width: 100;\" src=\"https://assets.skip.tools/videos/skip-keychain.mov\" type=\"video/mp4\"\u003e\n  Your browser does not support the video tag.\n\u003c/video\u003e\n\u003c/div\u003e\n\n## Setup\n\nTo include this framework in your project, add the following\ndependency to your `Package.swift` file:\n\n```swift\nlet package = Package(\n    name: \"my-package\",\n    products: [\n        .library(name: \"MyProduct\", targets: [\"MyTarget\"]),\n    ],\n    dependencies: [\n        .package(url: \"https://source.skip.tools/skip-keychain.git\", \"0.0.0\"..\u003c\"2.0.0\"),\n    ],\n    targets: [\n        .target(name: \"MyTarget\", dependencies: [\n            .product(name: \"SkipKeychain\", package: \"skip-keychain\")\n        ])\n    ]\n)\n```\n\n## Usage\n\n```swift\nimport SkipKeychain\n\nlet keychain = Keychain.shared\n\ntry keychain.set(\"value\", forKey: \"key\")\nassert(keychain.string(forKey: \"key\") == \"value\")\n\ntry keychain.removeValue(forKey: \"key\")\nassert(keychain.string(forKey: \"key\") == nil)\n```\n\n## Backups\n\nGoogle recommends excluding encrypted shared preference files from backups to prevent restoring an encrypted file whose encryption key is lost. If your app targets devices running Android 11 or lower, follow the instructions [here](https://developer.android.com/identity/data/autobackup#include-exclude-android-11) to create backup rules for your app and reference them from your `AndroidManifest.xml`. Your rules file should exclude SkipKeychain's shared preferences, like so:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cfull-backup-content\u003e\n    \u003cexclude domain=\"sharedpref\" path=\"tools.skip.SkipKeychain.xml\"/\u003e\n\u003c/full-backup-content\u003e\n```\n\nFor newer devices, follow [these instructions](https://developer.android.com/identity/data/autobackup#include-exclude-android-12) in addition to the steps above for older devices. Your additional rules file should contain the fllowing:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cdata-extraction-rules\u003e\n  \u003ccloud-backup\u003e\n    \u003cexclude domain=\"sharedpref\" path=\"tools.skip.SkipKeychain.xml\"/\u003e\n  \u003c/cloud-backup\u003e\n  \u003cdevice-transfer\u003e\n    \u003cexclude domain=\"sharedpref\" path=\"tools.skip.SkipKeychain.xml\"/\u003e\n  \u003c/device-transfer\u003e\n\u003c/data-extraction-rules\u003e\n```\n\n## Building\n\nThis project is a Swift Package Manager module that uses the\n[Skip](https://skip.tools) plugin to transpile Swift into Kotlin.\n\nBuilding the module requires that Skip be installed using \n[Homebrew](https://brew.sh) with `brew install skiptools/skip/skip`.\nThis will also install the necessary build prerequisites:\nKotlin, Gradle, and the Android build tools.\n\n## Testing\n\nThe module can be tested using the standard `swift test` command\nor by running the test target for the macOS destination in Xcode,\nwhich will run the Swift tests as well as the transpiled\nKotlin JUnit tests in the Robolectric Android simulation environment.\n\nParity testing can be performed with `skip test`,\nwhich will output a table of the test results for both platforms.\n\n## Contributing\n\nWe welcome contributions to this package in the form of enhancements and bug fixes.\n\nThe general flow for contributing to this and any other Skip package is:\n\n1. Fork this repository and enable actions from the \"Actions\" tab\n2. Check out your fork locally\n3. When developing alongside a Skip app, add the package to a [shared workspace](https://skip.tools/docs/contributing) to see your changes incorporated in the app\n4. Push your changes to your fork and ensure the CI checks all pass in the Actions tab\n5. Add your name to the Skip [Contributor Agreement](https://github.com/skiptools/clabot-config)\n6. Open a Pull Request from your fork with a description of your changes\n\n## License\n\nThis software is licensed under the\n[GNU Lesser General Public License v3.0](https://spdx.org/licenses/LGPL-3.0-only.html),\nwith the following\n[linking exception](https://spdx.org/licenses/LGPL-3.0-linking-exception.html)\nto clarify that distribution to restricted environments (e.g., app stores)\nis permitted:\n\n\u003e This software is licensed under the LGPL3, included below.\n\u003e As a special exception to the GNU Lesser General Public License version 3\n\u003e (\"LGPL3\"), the copyright holders of this Library give you permission to\n\u003e convey to a third party a Combined Work that links statically or dynamically\n\u003e to this Library without providing any Minimal Corresponding Source or\n\u003e Minimal Application Code as set out in 4d or providing the installation\n\u003e information set out in section 4e, provided that you comply with the other\n\u003e provisions of LGPL3 and provided that you meet, for the Application the\n\u003e terms and conditions of the license(s) which apply to the Application.\n\u003e Except as stated in this special exception, the provisions of LGPL3 will\n\u003e continue to comply in full to this Library. If you modify this Library, you\n\u003e may apply this exception to your version of this Library, but you are not\n\u003e obliged to do so. If you do not wish to do so, delete this exception\n\u003e statement from your version. This exception does not (and cannot) modify any\n\u003e license terms which apply to the Application, with which you must still\n\u003e comply.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskiptools%2Fskip-keychain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskiptools%2Fskip-keychain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskiptools%2Fskip-keychain/lists"}