I would like to suggest a future update to the Core Data book include a chapter on synchronizing a web API (remote data) with local storage in Core Data. This is a very common real world use case scenario. There is an excellent chapter / tutorial / talk from @astralbodies from 2016 RWDevCon covering this topic precisely, but it could really use an update and it really should be part of the Core Data book.
In Chapter 3 the Core Data book mentions, “In iOS 9, Apple introduced the ability to specify unique constraints on your Core Data entities. With unique constraints, you can specify in your data model which attributes must always be unique on an entity to avoid adding duplicates.” However this is never mentioned again in the book, nor how to implement it, nor is there ever made mention of NSMergeByPropertyObjectTrumpMergePolicy . It would be useful to have some explanation of how to use this to further simplify the synchronization process.
The proposed chapter could even skip using a “real” API - it could use stubbed JSON data that comes from some fictitious API, and could make use of Codable to convert said JSON to objects that then are synchronized with the local Core Data store. This would simplify the example from RWDevCon 2016 by removing the CouchDB layer.