A way of using Realm to persist data in a SwiftUI project.
This builds on one of the projects from "100 days of SwiftUI" (original here), by adding Realm persistence to the previously available File and CoreData.
To switch between persistence implementations, inject one of those in SceneDelegate.swift
: FilePersons()
, CoreDataPersons()
or RealmPersons()
.
Swift Package Manager initial retrieval of Realm can be a bit slow.
Photos by Austin Wade, Daniel Höhe, Nathaniel Vala, David Rotimi, Johan De Jager, Anastasia Vityukova on Unsplash