Moving this as an answer instead of a comment. Hope this helps someone experiencing the same issue
Found the solution to my issue, it's because I was calling it on Delegate's appDidFinishLaunching and apparently not all resources have been loaded yet at that point in time.
I had to change my persistentStore description to this:
description.shouldAddStoreAsynchronously = true
description.shouldMigrateStoreAutomatically = true
description.shouldInferMappingModelAutomatically = true
Noticed that it only happened on iOS 15.x
Its not the best at it means the store may create it before I did my first persistent store request. Probably adding in a queue manager will help, but that's a different issue
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: