skip to Main Content

Is it possible to turn selected properties/ columns of an NSManagedObject back to fault to optimise memory usage? – Ios swift

Currently, I have a note application, which I am using the following CoreData structure. extension Note { @nonobjc public class func fetchRequest() -> NSFetchRequest<Note> { return NSFetchRequest<Note>(entityName: "Note") } @NSManaged public var heavy_body: String? @NSManaged public var lite_title: String? @NSManaged…

VIEW QUESTION

Asynchronous read in CoreData – Difference in using newBackgroundContext + FetchRequest vs newBackgroundContext + NSAsynchronousFetchRequest? – Ios swift

It seems there are 2 ways to perform asynchronous read in CoreData, without blocking main thread UI. newBackgroundContext + NSFetchRequest Source : https://www.advancedswift.com/core-data-background-fetch-save-create/ // Create a new background managed object context let context = persistentContainer.newBackgroundContext() // If needed, ensure the…

VIEW QUESTION

Why I am getting Multithreading_Violation_AllThatIsLeftToUsIsHonor for this simplest NSAsynchronousFetchRequest use case? – Ios swift

I want to start learning to use NSAsynchronousFetchRequest by referring to https://www.marcosantadev.com/coredata_crud_concurrency_swift_2/ I have the simplest use case of NSAsynchronousFetchRequest NSAsynchronousFetchRequest // Call from UI main thread func X() { let fetchRequest = NSFetchRequest<NSPlainNote>(entityName: "NSPlainNote") let asynchronousFetchRequest = NSAsynchronousFetchRequest(fetchRequest: fetchRequest)…

VIEW QUESTION
Back To Top
Search