/stash

Super simple iOS persistence

Primary LanguageSwiftThe UnlicenseUnlicense

stash

Super simple iOS persistence.

Usage

Read stored values with read<T>(T.Type) -> [T] and write back with write<T>([T]).

T must be Codable.

Example

struct Dog : Codable {
    var name: String
    var age: Int
}

var dogs = Stash.read(Dog.self)

dogs.append(Dog(name: "Good", age: 7))
dogs.append(Dog(name: "Boye", age: 3))

Stash.write(dogs)