Skip to content

Instantly share code, notes, and snippets.

View InteractiveLogic's full-sized avatar

Evan K. Stone InteractiveLogic

View GitHub Profile
@InteractiveLogic
InteractiveLogic / Storage.swift
Created October 25, 2018 04:57 — 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