Core Data

Route Core Data implementation tasks to the correct Knowledge Contracts -- subclassing NSManagedObject and choosing an .xcdatamodeld Codegen mode (Class Definition/Manual-None/Category+Extension) with @NSManaged properties, standing up NSPersistentContainer via loadPersistentStores(completionHandler:) and viewContext with NSPersistentStoreDescription store options, NSManagedObjectContext CRUD (insertNewObject(forEntityName:into:)/init(context:), delete(_:), save(), perform(_:)/performAndWait(_:), parent), fetching with NSFetchRequest<T>/NSPredicate/NSSortDescriptor/context.fetch(_:)/@FetchRequest, and NSDeleteRule referential integrity. Use when writing @NSManaged public var, NSEntityDescription.insertNewObject(forEntityName:into:), Task(context:), NSPersistentContainer(name:), container.loadPersistentStores { }, container.viewContext, NSPersistentStoreDescription, context.insert(_:)/delete(_:)/save(), context.perform { }/performAndWait { }, context.parent, NSFetchRequest<Item>(entityName:), NSPredicate(forma

caglarbaranbora 5261834 4.0 KB Updated

File contents

caglarbaranbora/Apple-Agent-Kit/tree/main/skills/core-data commit 5261834190

Frequently asked questions

npx skillmds@latest add caglarbaranbora/core-data