Incredible find @funcmakerDan, thank you.
Removing @Environment(.modelContext) fixed it for me as well, on iOS 17.4 and visionOS 1.1, and Sonoma 14.4.
Post
Replies
Boosts
Views
Activity
As for the Xcode template 'timestamp' app, that might be a different issue. Did you set it up to use iCloud? When using iCloud syncing all @Model members must be optional or have a default value, but the Xcode template doesn't do that, and the compiler doesn't catch it. You get a runtime warning when creating the SwiftData structures.
Thanks for this fix @fer0n
Many social media and Developer Forum posts about the Fetch Source Code issue, and yet the Xcode Cloud status remains green. Frustrating.
Xcode Cloud status now yellow, so at least we've been noticed.
Nope, signing in-out does not help. Seems like trying Advanced Data Protection even one time permanently breaks access to CloudKit Console. Mine's been broken for about a year.
So disappointing
Sorry, I haven't seen that specific issue. I migrated completely back to Core Data and all is working well.
I do recall that during the process, while my app temporarily had both stacks, that it was important to make the Core Data models and SwiftData classes match exactly. Even small differences would gum up the works.
Good luck, this is a tough situation.
This worked for me too, thank @antarian !
Don't forget (like I did) that if you explicitly use the group name in your code using something like _ FileManager.default.containerURL(forSecurityApplicationGroupIdentifier:)_, you'll need to conditionalize it there too.
This worked for me too, thank @antarian !
Don't forget (like I did) that if you explicitly use the group name in your code using something like _ FileManager.default.containerURL(forSecurityApplicationGroupIdentifier:)_, you'll need to conditionalize it there too.