A swifter Core Data stack
This release closes the 5.0.0 milestone.
Swift 2.3 now required.
This release closes the 4.0.2 milestone.
This release closes the 4.0.1 milestone.
This release closes the 4.0.0 milestone.
This release includes a significant change to CoreDataStack
, which no longer uses child contexts. The mainContext
and backgroundContext
are now both connected to the persistent store coordinator. See #60 for the background and rationale behind this change. In short, child contexts are considered bad practice for this kind of stack setup and should really only be used for "throw away" work.
While this is technically a breaking change, it likely will not affect most clients. The behavior should remain largely unchanged — data is still kept in-sync between the 2 contexts. So unless you were specifically relying on this parent-child nesting behavior, you should be fine. 👍
Huge thanks to @Liquidsoul for closing most of the issues for this release and to @wiedem for contributing significantly as well! 🎉
mainContext
and backgroundContext
are now both connected to the persistent store coordinator (#60)concurrencyType
determines which context is the parent (#73)CoreDataStackFactory
has been simplified. There is now a single createStack()
method. (#77)In alignment with the latest Swift API guidelines, the library now prefers methods/extensions over free functions.
resetStack()
top-level function is now a method on CoreDataStack
(#75)deleteObjects()
top-level function is now an extension method on NSManagedObjectContext
(#76)fetch()
top-level function is now an extension method on NSManagedObjectContext
(#78)migrate()
top-level function is now an extension method CoreDataModel
(#82)All docs have been updated. As usual, check these out for more details on the changes described above.
There have been other general refinements and additional unit tests have been added. Test coverage is 94% 😎
This release closes the 3.0.0 milestone.
The goals of this release are primarily to adopt Swift 2.2 and refine the API to make it more Swifty, as the definition of Swifty has evolved.
There are many breaking changes in this release, however — with the exception of Swift 2.2 — they are all merely name changes that aim to reduce verbosity.
DefaultStoreOptions
to defaultStoreOptions
CoreDataSaveResult
to SaveResult
CoreDataStackResult
to StackResult
CoreDataModel.removeExistingModelStore()
to CoreDataModel.removeExistingStore()
enum
cases to be lowercase, in line with latest Swift API guidelines
StackResultClosure
typealias has been removedThis release closes the 2.2.1 milestone.
tvOS
, the default SQLite directory now defaults to .CacheDirectory
instead of .DocumentDirectory
(#61, #62). Thanks @cgoldsby !This release closes the 2.2.0 milestone.
Added a resetStack()
top-level function. See the updated docs for details. Thanks @marius-serban! :tada:
:warning: CoreDataStackFactory.CompletionHandler
was moved from the factory's scope to the module's scope and renamed to StackResultClosure
. This is technically a breaking change, but it is highly unlikely that anyone was referring to this closure directly. If so, simply rename to the correct type.
JSQCoreDataKit
now "officially" supports all Apple platforms: iOS, OSX, tvOS, watchOS. :tada:
:trophy: 2.1.0 milestone
JSQCoreDataKit
2.0 is here! :tada:CoreDataStack
via a CoreDataStackFactory
. This will init the stack on a background queue and return to your completion handler on the main queue when finished. This is necessary since adding a persistent store can take an unknown amount of time.CoreDataStack
. It now has a mainContext
and a backgroundContext
. :sunglasses:CoreDataSaveResult
to the completion handler, instead of NSError?
CoreDataStackFactory
for async stack initialization, as mentioned above. It also support synchronous init if you need it, but this is only recommended for testing. Returns a CoreDataStackResult
.CustomStringConvertible
and Equatable
. :facepunch:Find the complete list of closed issues here. :bug:
All documentation has been updated. :scroll:
The example app is actually an example app now, check it out! It's a pretty substantial demo.
This release closes the 1.1.0 milestone.
~/Documents/
See the documentation for more information!