Skip to content

A simple drop in Swift wrapper class for the keychain

License

Notifications You must be signed in to change notification settings

NLSVTN/Keychain.swift

 
 

Repository files navigation

Simple-KeychainSwift

[![CI Status](http://img.shields.io/travis/Ashley Mills/Simple-KeychainSwift.svg?style=flat)](https://travis-ci.org/Ashley Mills/Simple-KeychainSwift) Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

Manual

Just drop the Keychain.swift file into your project. That's it!

CocoaPods

Simple-KeychainSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Simple-KeychainSwift"

Author

Simple-KeychainSwift was wrtten by Ashley Mills, [email protected]

License

Simple-KeychainSwift is available under the MIT license. See the LICENSE file for more info.

Example usage

Set a key/value pair

Keychain.set("some value", forKey: "my key") Keychain.set(true/false, forKey: "my key")

Retrieve the value for a key

Keychain.value(forKey: "my key") Keychain.bool(forKey: "my key")

Delete a key/value pair

Keychain.removeValue(forKey: "my key")

Delete all values from the keychain

Keychain.reset()

Want to help?

Got a bug fix, or a new feature? Create a pull request and go for it!

Let me know!

If you use Keychain.swift, please let me know.

Cheers, Ash

About

A simple drop in Swift wrapper class for the keychain

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 48.4%
  • Shell 45.6%
  • Ruby 3.3%
  • Objective-C 2.7%