One of these two changes fixe my issue.
(1) My CoreDataStack was inside of a package, and the package didn't include .macCatalyst inside of the platforms.
Adding it fixed the issue.
platforms: [
.macCatalyst(.v26),
],
(2) Adding managedObjectContext to the view explicitly inside of a sheet
.sheet() {
View()
.environment(\.managedObjectContext, managedObjectContext)
}
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: