Storez
Safe, statically-typed, store-agnostic key-value storage
Highlights
-
Fully Customizable:
Customize the persistence store, theKeyType
class, post-commit actions .. Make this framework yours! -
Batteries Included:
In case you just want to use stuff, the framework is shipped with pre-configured basic set of classes that you can just use. -
Portability, Check!:
If you're looking to share code between you app and extensions, watchkit, apple watch, you're covered! You can use theNSUserDefaults
store, just set your shared container identifier as the suite name.
Example:
Features
Available Stores
Store | Backend | Subspec |
---|---|---|
UserDefaultsStore |
NSUserDefaults |
Storez/UserDefaults |
CacheStore |
NSCache |
Storez/Cache |
For all stores, simply use pod "Storez"
Type-safe, store-agnostic, nestable Key definitions
Initialize the store you want
Optionality is honored throughout
Custom objects easily supported
NEW Simply conform to Codable
!
(You can still use UserDefaultsConvirtable
if needed)
Make your own KeyType
Getting Started
Swift Package Manager
TODO: Write me
CocoaPods
CocoaPods is fully supported. You can choose which store you want to use (see above). Simply add the following line to your Podfile:
Motivation
I've seen a lot of great attempts at statically-types data stores, but they all build a tightly coupled design that limits the end-developer's freedom. With this framework, you can start prototyping right away with the shipped features, then replace the persistence store and KeyType
functionality with your heart's content and keep your code the way it is!
Author
Mazyod (@Mazyod)
License
Storez is released under the MIT license. See LICENSE for details.