NSFetchedResultsController crashing on performFetch: when using a cache

后端 未结 12 2169
迷失自我
迷失自我 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:27

    If you're using the simulator, try resetting it--I'd guess you've changed your entity map and it's getting confused by a leftover cache. If not, you could try doing what the error says:

    - (void)applicationWillTerminate:(UIApplication *)application {
        [NSFetchedResultsController deleteCacheNamed:@"Events"];
        //etc
    }
    

提交回复
热议问题