Open Source Swift Library For Working With Core Data Providing A Clean Syntax And Many Nice Features
I’ve mentioned a number of libraries for working with Core Data such as the Kipu library mentioned late last year for mapping a JSON response to a Core Data Database
Here’s an open source library called CoreStore submitted by John Estropia for working with Core Data in Swift that does a number of things better than other Core Data helper libraries.
As the readme states:
– Heavily supports multiple persistent stores per data stack, just the way .xcdatamodeld files are designed to. CoreStore will also manage one data stack by default, but you can create and manage as many as you need.
– New in 1.0.0: Incremental Migrations! Just tell the data stack the sequence of model versions and CoreStore will automatically use incremental migrations if needed on stores added to that stack.
– Ability to plug-in your own logging framework
– Gets around a limitation with other Core Data wrappers where the entity name should be the same as the NSManagedObject subclass name. CoreStore loads entity-to-class mappings from the managed object model file, so you are free to name them independently.
– Provides type-safe, easy to configure observers to replace NSFetchedResultsController and KVO
– Exposes API not just for fetching, but also for querying aggregates and property values
– Makes it hard to fall into common concurrency mistakes. All NSManagedObjectContext tasks are encapsulated into safer, higher-level abstractions without sacrificing flexibility and customizability.
– Exposes clean and convenient API designed around Swift’s code elegance and type safety.
– Documentation! No magic here; all public classes, functions, properties, etc. have detailed Apple Docs. This README also introduces a lot of concepts and explains a lot of CoreStore’s behavior.
You can find CoreStore on Github here.
A great library for working with Core Data.
Submit A Resource
Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?
You can submit the url here.
The resources we feel will appeal to our readers the most will be posted on the front page.