问题
For example, I have a entity named User in public database of Cloukit. Every new user using the App will record his identity in it, and only one record.
But in coredata+cloudkit environment, there is a user, two apple devices, two this Apps, one cloud. Firstly, the user use this App on the phone A, check existence of User in local coredata when startup, not exist, so create a User record. It's ok. Days later, the user do the same on the second Phone B, record not exist in local(not sync from cloudkit), create another user record of the same user.
After a while, there are two records of the same user in both phone A and phone B, even in cloukit. how to avoid this?
The configuration/preferences is the same, I just want to keep my only one configuration for my App on all phones by syncing with private database of cloudkit. But for the same reason, There will be al least two.
So how can I get only one record in coredata+cloudkit environment?
来源:https://stackoverflow.com/questions/65527786/how-can-i-get-only-unique-record-in-coredatacloudkitnspersistentcloudkitcontai