NSFetchedResultsController crashing on performFetch: when using a cache

后端 未结 12 2178
迷失自我
迷失自我 2020-12-23 14:05

I make use of NSFetchedResultsController to display a bunch of objects, which are sectioned using dates. On a fresh install, it all works perfectly and the objects are displ

12条回答
  •  感动是毒
    2020-12-23 14:10

    For those who run into the same problem nowadays, the problem is that somehow Core Data doesn't clean the cache so work fine at first time but doesn't after that. Then just put this line right after init the NSFetchRequest

    [NSFetchedResultsController deleteCacheWithName:@"Name"];
    

提交回复
热议问题