We're receiving crash reports where our app is killed by the system because of 0xdead10cc.
If I understand correctly this is happening because our app has a file lock or SQLite database lock.
Our app is using NSPersistentCloudKitContainer and is indexing the data to Core Spotlight. In my naiveté I assumed that NSPersistentCloudKitContainer and Core Spotlight would release any locks when app is suspended.
What is the best way to solve this? Asking for more background time doesn't feel like a solution, that will just postpone the crash.