Skip to content

Blueberry: Compatibility updates and bugfixes

Compare
Choose a tag to compare
@kreeger kreeger released this 07 Mar 23:24

Fixes a handful of issues that came about when trying to integrate Flapjack with one of our internal apps. Many of these changes are things we had already done to similar code inside of the app, but those changes had never made their way back around to Flapjack.

  • DataContext.findOrCreate(_:attributes:) now returns a non-optional tuple
  • NSManagedObjectContext will only persist() if there are actual persistent changed values (thanks to isDirty)
  • Set<>s now get parsed properly when fed into an NSCompoundPredicate using an attributes dictionary
  • CoreSingleDataSource now hinges primarily on an NSPredicate instead of an attributes dictionary
  • CoreSingleDataSource also now listens for contexts being created and torn down, in case the data source's lifecycle outlives that of the context it was listening to
  • CoreSingleDataSource now has a few more convenience initializers
  • CoreDataSource no longer tracks its own NSPersistentStore array
  • Objects now properly get found from mixed-type object sets in an NSManagedObjectContext change notification
  • A new method exists for getting a single entity from a Layer inside of NSMigrationManager
  • A few properties have been marked as public that were previously internal or private
  • MigrationPolicy is now open for subclassing