Data validation on insertion, update, and deletion in Core Data

Data validation in apps is important to make sure we save data conforming to the business rules. A name should ...
Read More
Core Data

Derived Attributes to improve Core Data Fetch Performance

Derived attributes are available since iOS 13 and aim to improve fetch performance in many different scenarios. Although we have ...
Read More
Core Data

Constraints in Core Data Entities explained

Constraints in Core Data are part of an entity configuration. Settings like the entity name and Spotlight display name might ...
Read More
Core DataSwift

NSManagedObject events: handling state in Core Data

An NSManagedObject lifecycle goes from insertion and updates until deletion in the end. All those events come with their own ...
Read More
Core DataSwift

How-to use Diffable Data Sources with Core Data

Diffable Data Sources were introduced at WWDC 2019 as a replacement for UICollectionViewDataSource and UITableViewDataSource. The API is available on ...
Read More
Core DataSwift

Persistent History Tracking in Core Data

WWDC 2017 introduced a new concept available from iOS 11 which is persistent history tracking. It's Apple's answer for merging ...
Read More
Core DataSwift

Write-Ahead Logging (WAL) disabled to force commits in Core Data

Write-Ahead Logging is the default journaling mode for Core Data SQLite stores since iOS 7 and OS X Mavericks. Journaling ...
Read More
Core DataSwift

ValueTransformer in Core Data explained: Storing absolute URLs

ValueTransformers in Core Data are a powerful way of transforming values before they get inserted into the database and before ...
Read More
Core DataSwift

Core Data Performance: 6 tips you should know

Writing Core Data code with performance in mind helps to prepare your app for the future. Your database might be ...
Read More
Core DataSwift

NSFetchedResultsController extension to observe relationship changes

Apple provides us with great classes like the NSFetchedResultsController to interact with Core Data databases in our apps. The API ...
Read More
Core DataSwift

Core Data and App extensions: Sharing a single database

Core Data got better and better over the years with improved APIs that make it easier to work with. The ...
Read More
Core DataSwift

Using NSBatchDeleteRequest to delete batches in Core Data

An NSBatchDeleteRequest can be used to efficiently delete a batch of entries from a Core Data SQLite persistent store. It runs ...
Read More
Core DataSwift