6

Sometimes I just wish Core Data would die.

I logged the managed object context of each object being touched and they're all identical. 😑😑😑😑😑😑

Comments
  • 1
    There's no benefit in having multiple Contexts the way you're describing them. If you're creating all of them with the same queue type, it's highly likely Core Data is optimising stuff and giving the same instance back to you upon creation. The reason why it's giving you this error is beyond me though.

    From my experience, a two-context setup is all you need. One for the UI/user-driven changes and another one for background batch operations (i.e fetching stuff from the network). Anything beyond that is overkill. It's just not the way the framework was built (albeit the docs aren't very clear about how to get a multi-context setup working).

    This article explores different Core Data setups. It's a bit old but I think it still holds: http://floriankugler.com/2013/04/...
Add Comment