Skip to content

Instantly share code, notes, and snippets.

View pgneri's full-sized avatar
👩‍💻
code, code, code...

Patrícia Gabriele Neri pgneri

👩‍💻
code, code, code...
View GitHub Profile
@pgneri
pgneri / Storage.swift
Created April 16, 2018 00:01 — forked from saoudrizwan/Storage.swift
Helper class to easily store and retrieve Codable structs from/to disk. https://medium.com/@sdrzn/swift-4-codable-lets-make-things-even-easier-c793b6cf29e1
import Foundation
public class Storage {
fileprivate init() { }
enum Directory {
// Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud.
case documents