A simple class that wraps the process of saving or loading a struct or class into a single file

Related tags

Guides EZFile
Overview

EZFile

This is a simple class that wraps the process of saving or loading a struct or class into a single file in the documents sandbox.

To use...

struct MyStruct : Codable { ... }  //mark your struct or class as Codable

let a = MyStruct()

EZFile.storeObject(a)   //write object to file

if let b = EZFile.retrieveObject(MyStruct.self) {   //attempt to read object from file  
    //Success! Now use b  
} else {  
    //failed :(  
}  

Operation...

Data is read and written to a single file in the users documents directory. Edit var filename to specify the file name.

To store an object a JSONEncoder is used to convert your Codable object into a Data object, then the Data can be written to a file. To load an object it does the reverse.

You might also like...
PowerfulCombine - A simple suite of Combine helpers
PowerfulCombine - A simple suite of Combine helpers

A package with powerful combine extensions. 🤟 Motivation The Combine framework

A wrapper around Foundation.Process, inspired by Rust's std::process::Command.

SwiftCommand A wrapper around Foundation.Process, inspired by Rust's std::process::Command. This package makes it easy to call command line programs a

RandMyMod base on your own struct or class create one or a set of instance, which the variable's value in the instance is automatic randomized.
RandMyMod base on your own struct or class create one or a set of instance, which the variable's value in the instance is automatic randomized.

RandMyMod is an IOS Native Framework helps you generate one or a set of variable base on your own model. No matter your model is Class / Struct. Insta

A protocol that allows any class to be printed as if it were a struct or a JSON object.

ReflectedStringConvertible A protocol that extends CustomStringConvertible and uses reflection to add a detailed textual representation to any class.

JSONHelper - ✌ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of!

JSONHelper Convert anything into anything in one operation; hex strings into UIColor/NSColor, JSON strings into class instances, y/n strings to boolea

Regex class for Swift. Wraps NSRegularExpression.

Regex.swift install Use CocoaPods. Add to your Podfile: pod 'Regex' And then run pod install from the shell: $ pod install usage Simple use cases: Str

Regex class for Swift. Wraps NSRegularExpression.

Regex.swift install Use CocoaPods. Add to your Podfile: pod 'Regex' And then run pod install from the shell: $ pod install usage Simple use cases: Str

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri
Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri. This plugin is similar to cordova-plugin-file-opener2 without installation support.

A sample app that implements the ideal UI representation around the loading process
A sample app that implements the ideal UI representation around the loading process

SwiftUILoadingStateSample This is a sample app that implements the ideal UI repr

This is the simple iOS app for browsing and saving recipes, using Spoonacular API
This is the simple iOS app for browsing and saving recipes, using Spoonacular API

TastyDojoApp This is the simple iOS app for browsing and saving recipes, using Spoonacular API This project includes: MVVM Pattern Searching through t

Convert your own struct/enum to AnyObject easily.

AnyObjectConvertible Convert your own struct/enum to AnyObject easily. Sumally We can cast everything as AnyObject at Swift3.0 🎉 So, we would not nee

Monaka convert custom struct to NSData.
Monaka convert custom struct to NSData.

Monaka Overview Monaka convert custom struct and fundamental values to NSData (also nested array and dictionary). Purpose You can persistent store of

A fast, convenient and nonintrusive conversion framework between JSON and model. Your model class doesn't need to extend any base class. You don't need to modify any model file.

MJExtension A fast, convenient and nonintrusive conversion framework between JSON and model. 转换速度快、使用简单方便的字典转模型框架 📜 ✍🏻Release Notes: more details Co

Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.

Helper functions for storing text in Keychain for iOS, macOS, tvOS and WatchOS This is a collection of helper functions for saving text and data in th

CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.

CompositionalLayoutDSL CompositionalLayoutDSL is a Swift library. It makes easier to create compositional layout for collection view. Requirements Doc

A Swift framework that wraps CoreData, hides context complexity, and helps facilitate best practices.
A Swift framework that wraps CoreData, hides context complexity, and helps facilitate best practices.

Cadmium is a Core Data framework for Swift that enforces best practices and raises exceptions for common Core Data pitfalls exactly where you make the

Elegant library that wraps working with frames with a nice chaining syntax.
Elegant library that wraps working with frames with a nice chaining syntax.

Everyone wants to see smooth scrolling, that tableview or collectionview scrolls without any lags and it's right choice. But the constraints do not gi

Headless iOS/Mac SDK for saving stuff to Pocket.
Headless iOS/Mac SDK for saving stuff to Pocket.

This SDK is deprecated Howdy all! 👋 Thanks for checking out this repo. Your 👀 mean a lot to us. 💗 Unfortunately, this project is deprecated, and th

Gamer-s-Collection - An app for searching and saving favorite games using rawg.io api and Core Data
Gamer-s-Collection - An app for searching and saving favorite games using rawg.io api and Core Data

Gamer-s-Collection - An app for searching and saving favorite games using rawg.io api and Core Data

Owner
null
This little app aims to help teach me how to implement more then one API in one single application in a reusable and properly structured manner.

LilAPI App News & Weather This little API app combines two of Jordan Singers Lil Software API's into one app. The goal with this app was to learn how

hallux 1 Oct 13, 2021
Demonstration of how to integrate AppleScript/Cocoa scripting into a Catalyst app

CatalystAppleScript Trivial demonstration showing how to build support for AppleScript into a Catalyst app. Showcases multiple commands and variables

Steven Troughton-Smith 47 Aug 11, 2022
Tech blog about Put Generic Protocol as Variable Type. How Combine Publisher put into AnyPublisher

How to Put Generic Protocol as Variable Type Have you ever put a Protocol on a variable? I believe you do. The Delegate pattern is using a lot in UIKi

Tsungyu Yu 8 Aug 17, 2021
Import files into your Swift scripts!

Swiftmix is a tool aimed to make better use of Swift scripts. Right now there is no decent way to import source files in scripts without using SPM. Sw

Vitaliy Salnikov 6 Nov 19, 2022
This is a course project for CodePath Professional iOS Development class.

Parstagram - Part I This is an Instagram clone with a custom Parse backend that allows a user to post photos and view a global photos feed. Time spent

Mingkai Chen 0 Oct 13, 2021
CAEmitterBehavior: a undocumented class that dramatically increases the power of CAEmitterLayer

?? XSConfettiDemo ⚠️ Warn This demo uses the CAEmitterBehavior class. CAEmitterB

null 4 Nov 15, 2022
A simple solution to decrease build time and more cleaner codebase

Swift Optional Optimizer A simple Protocol Oriented solution to decrease build time and more cleaner code base. Are you tired of using ?? in your code

Emad Beyrami 5 Dec 22, 2022
A simple menubar app can give you quick access to some macOS functions

OneClick This simple menubar app can give you quick access to some macOS functio

mik3 32 Dec 19, 2022
Create a simple MVVM-C iOS architecture with Swift for starters

iOS-Architecture-MVVM MVVM+Coordinators IOS Architecture Tutorial By Bobby Pehtr

Mehrdad Ahmadian 0 Dec 30, 2021
This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on..

SwiftUI MVVM COREDATA NOTE APP This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on... #FEATURES SWIFTUI MVVM COREDATA

Isaias Cuvula 1 Jul 20, 2022