Thank you!!
I was loading the persistent store in one of the classes init method, apparently its being called on installation/update of the app. I just moved the loading of the persistent store from init to getTimeline and added in some checks.
I'm guessing this is because main app gets loaded and calls the persistent store migration, same time as the widget calls the shared container migration
Post
Replies
Boosts
Views
Activity
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