问题
I am using Core data and iCloud for syncing purpose in my app.I am facing a problem when sync with two devices.
Example : I am using customerID as primary key in my database.when i entered a data in my one device that ID is no.1 and the same time If i entered a different data in my another device,that one also will be no.1,So when it sync and refresh the database my app is getting crashed due to same customerID which should be unique one.
Note : customer ID automatically get the next available number.
Please assist me to find a good solution for this. Thanks
来源:https://stackoverflow.com/questions/36545965/using-core-data-icloud-and-issue-with-live-sync