"Try adding a UUID attribute to all of your entities in the model. You'll have to migrate, but that should be easy as it's only adding one attribute per entity. Then fetch every entity and add the UUID to every managed object. Then save"
Thank you - that works. I also added a flag to the UserDefaults so this is only done once.