Native data persistence for iOS applications.
Setup time: 5 minutes
Sample project: https://github.com/SwiftfulThinking/SwiftfulSavingExample
Almost every native iOS application requires some form of local data persistence. This framework attempts to abstract that logic so that developers can save any type of data with a few lines of code.
Add the package to your xcode project
https://github.com/SwiftfulThinking/SwiftfulSaving.git
Import the package
import SwiftfulSaving
SwiftfulSaving supports saving to:
- FileManager (FM)
- CoreData (CD)
- UserDefaults (UD)
Generally, saving data requires the following steps:
- Create a parent-level directory where data will be saved
- Create a child-level service within the parent-level directory
- Conform your data type to the appropriate protocols
- Use the service to perform the operations
See the Wiki for full documentation (in progress).