This app demonstrates backing up and restoring Core Data persistent stores.
The UI is just a table view that lists trivial managed object entries, sorted by their timestamp field. The buttons at the top are as follows:
+
: Add a new entryThe guts of backing up and restoring are found in an NSPersistentContainer+extension.swift
. The process is described in detail in a blog post at https://atomicbird.com/blog/core-data-back-up-store/.