In my project, I enabled the "-com.apple.CoreData.ConcurrencyDebug" option, and the app started crashing. I was puzzled by this because everything seemed fine at first glance.
After some investigation, I realized the issue: we are creating a new entity for the store while using a shared store and its background context to remove unnecessary session entities. This mismatch in the queue is causing the crash.
Afterward, I added CoreData debug flags to the demo targets to identify and resolve the issue more quickly and easily.
Context
In my project, I enabled the "-com.apple.CoreData.ConcurrencyDebug" option, and the app started crashing. I was puzzled by this because everything seemed fine at first glance.
After some investigation, I realized the issue: we are creating a new entity for the store while using a shared store and its background context to remove unnecessary session entities. This mismatch in the queue is causing the crash.
Afterward, I added CoreData debug flags to the demo targets to identify and resolve the issue more quickly and easily.