Andrea Prearo
1 min readJan 8, 2019

--

You’re welcome Jack!

You can check if an item is already in Core Data by using a separate managed context as briefly illustrated in https://medium.com/@andrea.prearo/thanks-jesse-60a3d836ca07.

Depending on the complexity of your app architecture, it could make sense to use an abstraction layer to handle Core Data objects. This would be a good approach especially if you want to decouple your app from Core Data internals. For instance, you could build an abstraction layer that exposes a generic query interface for collections (by means of a protocol) and then create different concrete implementations to handle the details of Core Data and/or any other data persistence solution you may need/want to integrate.

--

--

Andrea Prearo

Experienced iOS Engineer and Software Craftsman with extensive expertise in building reusable libraries and components to scale development teams and products.