Skip to content

Instantly share code, notes, and snippets.

View Dast1Woop's full-sized avatar
🎯
Focusing

myl Dast1Woop

🎯
Focusing
View GitHub Profile
@Dast1Woop
Dast1Woop / Storage.swift
Created October 27, 2021 01:51 — 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