@State var documents: [ScanDocument] = [] func loadDocuments() { guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
I have a data model like this. The data is connected to core data. import Foundation import CoreData @objc(Aktie) class Aktie: NSManagedObject { @NSManaged
My app backup the data to iCloud or sync with user device through the user iCloud account using NSPersistentCloudKitContainer privateDataBase. The main problem
I have an app that works well synchronizing the local core data records with a private database. I would like to make the CloudKit database a shared database an
self learning beginner here. When I remove .onAppear{add()}, the preview works fine. I tried to attach it to other the body view, the Vstack but it causes anot
I'm building a Macos CoreData+CloudKit app. I first create my container by doing this: let container = NSPersistentCloudKitContainer(name: "TestApp") let descri
When I use my app, sometimes, I have an error that appear, it seems to be randomly (or I didn't figure out when exactly...), then all my lists are empty (like i
[EDIT] I was hoping that Apple would have fixed what is obviously a bug. The solution is to clear the cache, close and reopen Xcode.. I am on Xcode Beta and sta
Im trying to pass data of some object from list of objects to modal sheet, fetching data from CoreData. The problem is that no matter what object I click on i
I'm currently making a to do list app using Swift 4. The home view controller has a tableview with some categories in it and when one is selected, it takes the
I know SwiftUI uses state-driven rendering. So I was assuming, when I delete Core Data Entity entries, that my List with Core Data elements gets refreshed immed
How can I limit the size of the retrieved FetchedResults when making a FetchRequest to CoreData? struct ContentView: View { var fetchRequest:FetchRequest&l
I'm experimenting code from https://alanquatermain.me/programming/swiftui/2019-11-15-CoreData-and-bindings/ my goal is to have DatePicker bind to Binding<
There is a similar question in stack overflow already but it doesn't work for me. There is a use case in my application where I have to observe the database ch
How to change just one toggle in a list without subviews? I know how to make it work if I extract Subview from everything inside ForEach, but how to do it on on
I’m currently migrating my app to use the concurrency model in Swift. I want to serialize Tasks to make sure they are executed one after the other (no par
I have an issue in a client's app where calls to valueForKey: on an NSManagedObject subclass are failing for particular CoreData properties when the app is buil
Basic approach I am currently tring to clean up my Core Data/SwiftUI code, and part of that is moving code out of my Views and into my ViewModels. Since it seem
I have stored the letters(String), numbers(Int16) and Date(Date) in the core data. And the filter(NSPredicate) succeeded in organizing only the necessary data.
How can I set a custom store.sqlite URL to NSPersistentContainer? I have found an ugly way, subclassing NSPersistentContainer: final public class PersistentCo