Post

Replies

Boosts

Views

Activity

Reply to App increases size even if I delete data (Core Data)
short answer: don't worry about it. Apple has invested heavily in CoreData and uses it extensively. wrt deleted records, Core Data will clean up its storage over time. longer answer: to understand what's going on, you'll have to dive into the architecture and implementation of structured database systems, and specifically how SQLite (which is used by default by Core Data) organizes data and indices into its file structures. For some insights, see here https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreData/PersistentStoreFeatures.html
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to Intermittent crash when saving to Core Data
I recommend enabling all the debugging support for Core Data in Xcode. See here for more… https://useyourloaf.com/blog/debugging-core-data/ most often, a crash during save means you created an NSManagedObject in one context, and tried to save in another context. Also, you should be doing a save within the thread owned by the context, like this context.perform { // load objects // make changes try context.save() }
Dec ’21