Relationship persistence with NSPersistentCloudKitContainer
Asked Answered
C

1

6

I'm working on an app that uses NSPersistentCloudKitContainer to share data between devices. The core data model has multiple entities, two of which are connected using a relationship with it's respective inverse. The issue I'm having is that when I set the relationship to nil the cloud data is not updated and when I restart the app, the relationship gets reset back what it was before it was set to nil.

Is this a bug in the new NSPersistentCloudKitContainer? Is anyone else having this issue?

Checkers answered 13/8, 2019 at 3:7 Comment(3)
I just realised the issue now, core data seems to remove the relationship properly, but after a sync, the relationship will come back again!Microbicide
Did you manage to figure this out? I realised that even in the CloudKit Dashboard, there is no way to remove a field. If I set the string field to empty it will crash CoreData when it syncs down. Seems like the only way is to create my own dummy "nil" object for it to link to.Microbicide
Have the same issue: #62001358 Just noticed yours now, I hope I might get some useful insight. Did you somehow work around this issue?Pittsburgh
M
0

iOS 14 seems to have fixed this issue for me.

Microbicide answered 26/10, 2020 at 16:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.