While working through a SwiftUI Tutorial, I found that using:
FileManager.default.url(for:, in:, appropriateFor:, create:)
to locate a directory for persisting some data, does not work on Apple Silicon Macs when building an app for the "My Mac (Designed for iPad)". Quitting the app loses all state saved. Both the iPhone and iPad test devices are able to save and restore state using this method as usual.
Is this the expected behavior? I expected that the M1 platform would be capable of simulating a similar file system for the application.
Targeting macOS, iOS, and iPadOS, what's the simplest method to acquire a valid "Documents" or "Data" directory to persist information across launches and after app updates? (Before going nuclear with CoreData, just hasn't been the most friendly API to work with in my experience so far)
FileManager.default.url(for:, in:, appropriateFor:, create:)
to locate a directory for persisting some data, does not work on Apple Silicon Macs when building an app for the "My Mac (Designed for iPad)". Quitting the app loses all state saved. Both the iPhone and iPad test devices are able to save and restore state using this method as usual.
Is this the expected behavior? I expected that the M1 platform would be capable of simulating a similar file system for the application.
Targeting macOS, iOS, and iPadOS, what's the simplest method to acquire a valid "Documents" or "Data" directory to persist information across launches and after app updates? (Before going nuclear with CoreData, just hasn't been the most friendly API to work with in my experience so far)