0 Replies
      Latest reply on Aug 6, 2015 9:15 PM by Big38
      Big38 Level 1 Level 1 (0 points)

        Description:

        I have separate classes that run NSFetchedResultsController on both UITableView and UICollectionView. They've been working in iOS 8. Since iOS 9, I occasionally get the console error below on NSManagedObject updates. The changes to NSManagedObject is valid and saves properly to persistent store. However, the UI for UITableView/UICollectionView backed by the NSFetchedResultsController breaks and shows blank rows.

         

        Console:

        Assertion failure in -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:]

        CoreData: error: Serious application error.  An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:.  attempt to delete and reload the same index path (<NSIndexPath: 0xc000000000400016> {length = 2, path = 0 - 2}) with userInfo (null)

         

        Update:

        iOS9 Beta 2 not fixed and no solution yet, but below's the line that's causing the trouble:

         

             self.tableView.reloadRowsAtIndexPaths()

         

        Seems like it's having trouble reloading cells on updates.

         

        Update 2:

        iOS9 Beta 3 still broken.

        The root cause of all this is during the NSFetchedResultsController's delegate call for an update, NSFetchedResultsChangeMove and NSFetchedResultsChangeUpdate are both called. Not sure if this use to happen in iOS 8 and prior but just didn't throw off errors.

         

        Update 3:

        Issue fixed once updated to iOS 9 Beta 5