Swiftpack.co - trochoid/EZIO as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by trochoid.
trochoid/EZIO 0.0.5
Simple input and output
⭐️ 0
🕓 2 weeks ago
iOS
.package(url: "https://github.com/trochoid/EZIO.git", from: "0.0.5")

EZIO 0.0.4, Apr 2022, https://github.com/trochoid/EZIO.git

EZIO Documentation

This is my first package Yay! Intention of EZIO is for a super simple no-brain way to take an object in my program and save it someplace, and of course to load the object back.

This is super alpha code, it's actually a collection of little wrappers I made to work with Codable, so the naming and organization is somewhat inconsistent.

Codable <-> UserDefaults

examples...

 EZIO.storeObj(obj: myObject, key: kKeyString)

 if let obj = EZIO.loadObj(type: MyObject.self, key: kKeyString) { ... }

@AppStorage read/writes to UserDefaults too

Codable <-> external file

This uses 2 Buttons to wrap the functionality of writing an external file because a sheet has to be shown to ask the user for access permission, and, well, I only know how to do that with a view in hand. Anyways if the user grants permission then a security bookmark is stored in UserDefaults so they only have to grant access once; or until UserDefaults are erased.

 ButtonSave<MyObject>("save obj", fileName: kFileName) {
     //prepare myObject for saving
     return myObject
 }

 ButtonLoad("ButtonLoad", fileName: kFileName, type: MyObject.self) { obj in
     //use obj
 }

String,UIImage,UIColor,URL <-> UIPasteboard

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

0.0.5
4 weeks ago

Very first release of EZIO as a package, huzzah!

Version 0.0.5, gonna try to use it. Basic but crude error handling, mostly got the features.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics