Core Data viewContext not receiving updates from newBackgroundContext() with NSFetchedResultsController

后端 未结 4 2022
一生所求
一生所求 2021-01-30 16:59

In my application, I have a NSFetchedResultsController to load Core Data objects in a UITableView. The fetch request associated with this FRC uses the new vie

4条回答
  •  清酒与你
    2021-01-30 17:40

    You're seeing the correct behavior. If you want your viewContext to automatically pick up changes from other contexts, including ones created by newBackgroundContext(), you have to set automaticallyMergesChangesFromParent to true.

    I agree that the docs are confusing on that point, "...and to automatically consume save notifications from other contexts."

提交回复
热议问题