Search code examples
core-dataios8nsfetchedresultscontroller

Are "NSFetchedResultsChangeMove" and "NSFetchedResultsChangeUpdate" required in didChangeSection: event for iOS 8+ NSFetchedResultsController?


I'm receiving this warning: "Enumeration values 'NSFetchedResultsChangeMove' and 'NSFetchedResultsChangeUpdate' not handled in switch" since iOS 8.

Are these required/supported in iOS 8 for sections, or is it safe to simply provide a "default:" catch-all to remove the warning?


Solution

  • It's safe to just add a default, according to the documentation of NSFetchedResultsControllerDelegate the only possible values are for insert or delete:

    type: The type of change (insert or delete). Valid values are NSFetchedResultsChangeInsert and NSFetchedResultsChangeDelete.