👨🏻💻 UX Designer, self-employed at NEXT PLANET - small design studio. 👨🏻💻 Indie iOS developer 📱 Creator of: Moons, Numi, Skoro, Wins and Emo. 🎸Guitarist at ZERO and Quadroom 🎨 MA in art 🌱 Vegan
Markdown supported · ⌘↵ to post
Thank you very much for this code, I tried with ChatGPT and a YouTube video to create App Groups but only with you I could do the migration. The only problem, which is still small, is that the following line gave me an error because the database was not found:
init(inMemory: Bool = false) { container = NSPersistentCloudKitContainer(name: "iCloud.com.yourDomain.YourAppName’")
It should be only with the model name, ie: NSPersistentCloudKitContainer(name: "YourAppName’")
Rodrigo
Ivan Amakhin
You should reset context before destroy container to don't get crash.
Cannot attach stack overflow link but you can find core data error
"Core data crash when resetting the store: 'Object's persistent store is not reachable from this NSManagedObjectContext's coordinator'"