iOS crash 'NSInternalInconsistencyException', reason: 'statement is still active' Core Data cache related?

前端 未结 2 1757
太阳男子
太阳男子 2021-02-07 08:05

Very occasionally seeing these pop up in crash reports on screens using NSFetchedResultsController, and not sure how to address them. I don\'t believe I\'m using th

2条回答
  •  广开言路
    2021-02-07 08:52

    Got this error while simultaneously requesting data with NSFetchedResultController (from main thread context) and NSFetchRequest through my background context.

    The way I have handled this is by making each of my MOCs have its own persistent store coordinator. Both of the persistent store coordinators talk to the same persistent store on disk.

提交回复
热议问题