{"id":13538443,"url":"https://github.com/auth0/simplekeychain","last_synced_at":"2025-05-14T18:03:56.202Z","repository":{"id":37601659,"uuid":"25323654","full_name":"auth0/SimpleKeychain","owner":"auth0","description":"A simple Keychain wrapper for iOS, macOS, tvOS, and watchOS","archived":false,"fork":false,"pushed_at":"2025-05-08T21:32:08.000Z","size":1802,"stargazers_count":639,"open_issues_count":4,"forks_count":79,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-05-14T06:13:41.163Z","etag":null,"topics":["dx-sdk","ios","keychain","security"],"latest_commit_sha":null,"homepage":"https://auth0.github.io/SimpleKeychain","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/auth0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-10-16T21:53:59.000Z","updated_at":"2025-05-08T21:32:11.000Z","dependencies_parsed_at":"2023-02-16T07:45:41.367Z","dependency_job_id":"f46c04cc-feb5-4fd6-acb5-ac04a2c7a000","html_url":"https://github.com/auth0/SimpleKeychain","commit_stats":{"total_commits":193,"total_committers":34,"mean_commits":5.676470588235294,"dds":0.6735751295336787,"last_synced_commit":"5dc5b3fec6e02614eaa7651d5323d097d9bf5ed9"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FSimpleKeychain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FSimpleKeychain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FSimpleKeychain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FSimpleKeychain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auth0","download_url":"https://codeload.github.com/auth0/SimpleKeychain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198452,"owners_count":22030964,"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":["dx-sdk","ios","keychain","security"],"created_at":"2024-08-01T09:01:12.128Z","updated_at":"2025-05-14T18:03:51.179Z","avatar_url":"https://github.com/auth0.png","language":"Swift","readme":"![SimpleKeychain](https://cdn.auth0.com/website/sdks/banners/simplekeychain-banner.png)\n\n![Version](https://img.shields.io/cocoapods/v/SimpleKeychain.svg?style=flat)\n![Build Status](https://img.shields.io/github/actions/workflow/status/auth0/SimpleKeychain/main.yml?style=flat)\n[![Coverage Status](https://img.shields.io/codecov/c/github/auth0/SimpleKeychain/master.svg?style=flat)](https://codecov.io/github/auth0/SimpleKeychain)\n![License](https://img.shields.io/github/license/auth0/SimpleKeychain.svg?style=flat)\n\n📚 [**Documentation**](#documentation) • 🚀 [**Getting Started**](#getting-started) • 📃 [**Support Policy**](#support-policy) • 💬 [**Feedback**](#feedback)\n\nMigrating from 0.x? Check the [Migration Guide](V1_MIGRATION_GUIDE.md).\n\n## Documentation\n\n- [**Examples**](EXAMPLES.md) - explains how to use more advanced features.\n- [**API Documentation**](https://auth0.github.io/SimpleKeychain/documentation/simplekeychain) - documentation auto-generated from the code comments that explains all the available features.\n  + [SimpleKeychain](https://auth0.github.io/SimpleKeychain/documentation/simplekeychain/simplekeychain)\n  + [Accessibility](https://auth0.github.io/SimpleKeychain/documentation/simplekeychain/accessibility)\n  + [SimpleKeychainError](https://auth0.github.io/SimpleKeychain/documentation/simplekeychain/simplekeychainerror)\n- [**Auth0 Documentation**](https://auth0.com/docs) - explore our docs site and learn more about Auth0.\n\n## Getting Started\n\n### Requirements\n\n- iOS 14.0+ / macOS 11.0+ / tvOS 14.0+ / watchOS 7.0+\n- Xcode 15.x\n- Swift 5.9+\n\n\u003e [!IMPORTANT]\n\u003e Check the [Support Policy](#support-policy) to learn when dropping Xcode, Swift, and platform versions will not be considered a **breaking change**.\n\n### Installation\n\n#### Swift Package Manager\n\nOpen the following menu item in Xcode:\n\n**File \u003e Add Packages...**\n\nIn the **Search or Enter Package URL** search box enter this URL: \n\n```text\nhttps://github.com/auth0/SimpleKeychain\n```\n\nThen, select the dependency rule and press **Add Package**.\n\n#### Cocoapods\n\nAdd the following line to your `Podfile`:\n\n```ruby\npod 'SimpleKeychain', '~\u003e 1.0'\n```\n\nThen, run `pod install`.\n\n#### Carthage\n\nAdd the following line to your `Cartfile`:\n\n```text\ngithub \"auth0/SimpleKeychain\" ~\u003e 1.0\n```\n\nThen, run `carthage bootstrap --use-xcframeworks`.\n\n### Usage\n\n**Learn about more advanced features in [Examples ↗](EXAMPLES.md)**\n\n**See all the available features in the [API documentation ↗](https://auth0.github.io/SimpleKeychain/documentation/simplekeychain)**\n\n```swift\nlet simpleKeychain = SimpleKeychain()\n```\n\nYou can specify a service name under which to save items. By default the bundle identifier of your app is used.\n\n```swift\nlet simpleKeychain = SimpleKeychain(service: \"Auth0\")\n```\n\n#### Store a string or data item\n\n```swift\ntry simpleKeychain.set(accessToken, forKey: \"auth0-access-token\")\n```\n\n#### Check if an item is stored\n\n```swift\nlet isStored = try simpleKeychain.hasItem(forKey: \"auth0-access-token\")\n```\n\n#### Retrieve a string item\n\n```swift\nlet accessToken = try simpleKeychain.string(forKey: \"auth0-access-token\")\n```\n\n#### Retrieve a data item\n\n```swift\nlet accessToken = try simpleKeychain.data(forKey: \"auth0-credentials\")\n```\n\n#### Retrieve the keys of all stored items\n\n```swift\nlet keys = try simpleKeychain.keys()\n```\n\n#### Remove an item\n\n```swift\ntry simpleKeychain.deleteItem(forKey: \"auth0-access-token\")\n```\n\n#### Remove all items\n\n```swift\ntry simpleKeychain.deleteAll()\n```\n\n#### Error handling\n\nAll methods will throw a `SimpleKeychainError` upon failure.\n\n```swift\ncatch let error as SimpleKeychainError {\n    print(error)\n}\n```\n\n## Support Policy\n\nThis Policy defines the extent of the support for Xcode, Swift, and platform (iOS, macOS, tvOS, and watchOS) versions in SimpleKeychain.\n\n### Xcode\n\nThe only supported versions of Xcode are those that can be currently used to submit apps to the App Store. Once a Xcode version becomes unsupported, dropping it from SimpleKeychain **will not be considered a breaking change**, and will be done in a **minor** release.\n\n### Swift\n\nThe minimum supported Swift minor version is the one released with the oldest-supported Xcode version. Once a Swift minor becomes unsupported, dropping it from SimpleKeychain **will not be considered a breaking change**, and will be done in a **minor** release.\n\n### Platforms\n\nWe support only the last four major versions of any platform, including the current major version.\n\nOnce a platform version becomes unsupported, dropping it from SimpleKeychain **will not be considered a breaking change**, and will be done in a **minor** release. For example, iOS 14 will cease to be supported when iOS 18 gets released, and SimpleKeychain will be able to drop it in a minor release.\n\nIn the case of macOS, the yearly named releases are considered a major platform version for the purposes of this Policy, regardless of the actual version numbers.\n\n## Feedback\n\n### Contributing\n\nWe appreciate feedback and contribution to this repo! Before you get started, please see the following:\n\n- [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)\n- [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)\n- [SimpleKeychain's contribution guide](CONTRIBUTING.md)\n\n### Raise an issue\n\nTo provide feedback or report a bug, please [raise an issue on our issue tracker](https://github.com/auth0/SimpleKeychain/issues).\n\n### Vulnerability reporting\n\nPlease do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png\" width=\"150\"\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.auth0.com/website/sdks/logos/auth0_dark_mode.png\" width=\"150\"\u003e\n    \u003cimg alt=\"Auth0 Logo\" src=\"https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png\" width=\"150\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eAuth0 is an easy-to-implement, adaptable authentication and authorization platform. To learn more check out \u003ca href=\"https://auth0.com/why-auth0\"\u003eWhy Auth0?\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eThis project is licensed under the MIT license. See the \u003ca href=\"./LICENSE\"\u003e LICENSE\u003c/a\u003e file for more info.\u003c/p\u003e\n","funding_links":[],"categories":["\u003ca id=\"06fccfcc4faa7da54d572c10ef29b42e\"\u003e\u003c/a\u003e移动\u0026\u0026Mobile","\u003ca id=\"58cd9084afafd3cd293564c1d615dd7f\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"dbde77352aac39ee710d3150a921bcad\"\u003e\u003c/a\u003eiOS\u0026\u0026MacOS\u0026\u0026iPhone\u0026\u0026iPad\u0026\u0026iWatch","\u003ca id=\"d0108e91e6863289f89084ff09df39d0\"\u003e\u003c/a\u003e新添加的"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fsimplekeychain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0%2Fsimplekeychain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fsimplekeychain/lists"}