The changelog for JSQCoreDataKit
. Also see the releases on GitHub.
- TBA
This release closes the 10.0.0 milestone.
-
Introduced a new component,
FetchedResultsCoordinator
, which handles all of the boilerplate for setting up anNSFetchedResultsController
and updating the content of aUICollectionView
. All you need to do is provide aFetchedResultsCellConfiguration
and anNSFetchRequest
. See the documentation and example project for details. (#201) -
Added
FetchedResultsController
, a generic subclass ofNSFetchedResultsController
that's nicer to use in Swift.
- Upgraded to Swift 5.4
-
Xcode 13.0 now required
-
Dropped support for old OS versions:
- iOS 14+ now required
- tvOS 14+ now required
- watchOS 6+ now required
- macOS 10.14+ now required
This release closes the 9.0.3 milestone.
- Upgraded to Xcode 12 and Swift 5.3
This release closes the 9.0.2 milestone.
- Support for Swift Package Manager
- Upgraded to Swift 5.2
- Upgraded to Xcode 11.4
- Upgraded to SwiftLint 0.39.2
This release closes the 9.0.1 milestone.
- Carthage support (#92, #138, @kevnm67)
This release closes the 9.0.0 milestone.
-
Removed
NSManagedObjectContext
extensionfunc save(wait:, completion:)
. Replaced with two new extension methods,func saveAsync(completion:)
andfunc saveSync(completion:)
. -
Removed
SaveResult
type in favor of Swift's new genericResult
type. -
Removed
StackResult
type in favor of Swift's new genericResult
type. -
Renamed
CoreDataStackFactory
toCoreDataStackProvider
-
Added
typealias SaveResult = Result<NSManagedObjectContext, Error>
(Replaces the formerSaveResult
type.) -
Added
typealias StackResult = Result<CoreDataStack, Error>
(Replaces the formerStackResult
type.)
- Upgraded to Swift 5.1
- Update to Xcode 11
- Update SwiftLint to 0.35.0, add new rules
This release closes the 8.0.0 milestone.
- iOS 11.0 minimum now required
- tvOS 11.0 minimum now required
- macOS 10.12 minimum now required
- watchOS 4.0 minimum now required
- Upgraded to Swift 4.2 (#125)
- Update to Xcode 10.1
- Update SwiftLint to 0.27.0
-
PersistentStoreOptions
typealias is now[AnyHashable: Any]
(#119) -
Make APIs more "swifty" (#120)
- Nest top-level function
defaultDirectoryURL()
underCoreDataModel
- Nest
ChildContext
typealias underNSManagedObjectContext
extension - Move
saveContext()
top-level function to extension method onNSManagedObjectContext
- Nest top-level function
- Use
Equatable
auto-synthesis where possible
- Converted to Swift 4.0
- iOS 9.0 minimum now required
- tvOS 10.0 minimum now required
- watchOS 3.0 minimum now required
- macOS 10.11 minimum now required
- Fixed some warnings from Swift 3.1 / Xcode 8.3
This release closes the 6.0.2 milestone.
- Fixed an issue where model migrations would fail. (#106, #109. Thanks @yasserislam, @marius-serban!)
This release closes the 6.0.1 milestone.
- Fixed an issue with
carthage
failing. (#100, #101, #102) Thanks @darkhonor and @tonyarnold!
This release closes the 6.0.0 milestone.
Swift 3.0 now required.
- Migrated to Swift 3.0
- Removed
entity(name: String, context: NSManagedObjectContext) -> NSEntityDescription
- Removed
FetchRequest<T: NSManagedObject>
(new Swift overlays now provide genericNSFetchRequest
) - Remove the
delete()
andfetch()
extensions onNSManagedObjectContext
(new Swift overlays now provide these)
- There's a new protocol,
CoreDataEntityProtocol
, which provides a better API for creating entity descriptions and inserting managed objects (#87). It also provides some helpful extensions. Conform to the newCoreDataEntityProtocol
to take advantage of this. This replaces the (removed) top-level functionentity(name:, context:) -> NSEntityDescription
This release closes the 5.0.0 milestone.
Swift 2.3 now required.
This release closes the 4.0.2 milestone.
- Fixed an issue where sqlite temporary files would not be cleaned up when removing the store (#85). Thanks @deemadden!
This release closes the 4.0.1 milestone.
- Fixed a multithreading concurrency violation while merging (#83). Thanks @saurabytes!
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! 🎉
- The
mainContext
andbackgroundContext
are now both connected to the persistent store coordinator (#60) - When creating a child context, the
concurrencyType
determines which context is the parent (#73) CoreDataStackFactory
has been simplified. There is now a singlecreateStack()
method. (#77)
In alignment with the latest Swift API guidelines, the library now prefers methods/extensions over free functions.
- The
resetStack()
top-level function is now a method onCoreDataStack
(#75) - The
deleteObjects()
top-level function is now an extension method onNSManagedObjectContext
(#76) - The
fetch()
top-level function is now an extension method onNSManagedObjectContext
(#78) - The
migrate()
top-level function is now an extension methodCoreDataModel
(#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.
- Migrated to Swift 2.2. (#67) Swift 2.2 and above is now required.
- Renamed
DefaultStoreOptions
todefaultStoreOptions
- Renamed
CoreDataSaveResult
toSaveResult
- Renamed
CoreDataStackResult
toStackResult
- Renamed
CoreDataModel.removeExistingModelStore()
toCoreDataModel.removeExistingStore()
- Renamed all
enum
cases to be lowercase, in line with latest Swift API guidelines - The
StackResultClosure
typealias has been removed
- Support for Swift Package Manager (#55) 🎉
- Core Data model migration support! (#46, #66) Thanks @marius-serban ! 🎉 See the README and docs for details!
This release closes the 2.2.1 milestone.
- Fixed multithreading violation while saving context (#63, #59, #65). Thanks @saurabytes and @markkrenek!
- On
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! 🎉
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. 🎉
-
Swift 2.0
-
You must now initialize
CoreDataStack
via aCoreDataStackFactory
. 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. -
Rethinking and rewriting of
CoreDataStack
. It now has amainContext
and abackgroundContext
. 😎 -
Saving a context now returns a
CoreDataSaveResult
to the completion handler, instead ofNSError?
-
New
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 aCoreDataStackResult
. -
All types now conform to
CustomStringConvertible
andEquatable
. 👊
Find the complete list of closed issues here. 🐛
All documentation has been updated. 📜
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.
- New top-level functions
- Ability to specify store directory other than
~/Documents/
- No breaking changes
See the documentation for more information!
It's here!
Checkout the README
and documentation.