TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jul 2015 |
SPMSupports SPM | ✗ |
Maintained by Max Sokolov.
A lightweight key/value wrapper for user defaults, keychain and file storage with common interface
Simply add objects to an appropriate storage.
ObjectStorage.defaults().setObject(user, forKey: "user") // NSUserDefaults
ObjectStorage.keychain().setObject(user, forKey: "user") // Keychain
ObjectStorage.localFile().setObject(user, forKey: "user") // Serialize object and save to the Documents dir
Get objects same way.
var user = ObjectStorage.keychain().objectForKey("user") as? User
Using CocoaPods:
use_frameworks!
pod 'ObjectStorage'
Manually:
Simply add all files from the ObjectStorage dir to your xcode project.
Full test coverage.
MIT license. See the LICENSE file for more information.