The Problem:
Adding does work, but removing the Group never appears on a different device. As soon as the Item gets edited on the different device, the Group relation re-appears with the new changes (even if manually removed there as well).
What I see in CloudKit dashboard:
Group field on Item is of type String.
A fresh Item record, never assigned to a Group, does not have the Group field.
Removing the Group does not remove the Group field in CloudKit.
As soon as it gets a Group field, I can’t get rid of it. Manually emptying the value causes to crash on download.
The behaviour can easily be reproduced with the example project (https://developer.apple.com/documentation/coredata/synchronizing_a_local_store_to_the_cloud?language=objc). Just replace deleting an Attachment from a Post with unassigning it instead.
Workarounds
I can think of these 4 workarounds:
Just use To-Many relation and manage to allow only a single assignment.
Not use a relation at all, just manually track assignment.
Add isRemoved flag and filter accordingly.
Create an "Empty-Group" record to assign to instead of removing.