Is Core Data compatible with SwiftUI?

Hi! I've been messing around with Swift and SwiftUI for 2-4 weeks now. I decided to make a guide app or something that's a bit customizable. So, I searched for tutorials on how to save data locally. I found out Core Data is the framework for that job, and luckily, I found out it's in Apple's developer documentation website. The thing is, though, it isn't for SwiftUI. I think it's for Storyboards or UIKit.

Can I use CoreData with SwiftUI?
Answered by TurtleLover in 642527022
I have an answer here
Yes it is.

Here is a tutorial for this:
https ://www.raywenderlich. com/9335365-core-data-with-swiftui-tutorial-getting-started
@Claude31, this one has the SceneDelegate thing. I think that's for storyboards. I only have ContentView and a bunch of views that I made.
@Claude31, how about the correct answer here?

how about the correct answer here?

Maybe, I did not investigate the detail of the thread.

But that confirms what I said: it is possible (even may be not easy).
@Claude31, is there an easier way to do it? Or do I have to wait until Apple creates an easier way to use Core Data with SwiftUI?
Accepted Answer
I have an answer here
Great you have an answer.

You could now close the 2 threads…
Is Core Data compatible with SwiftUI?
 
 
Q