Using Core Data, iCloud and issue with live sync

泄露秘密 提交于 2019-12-11 05:17:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!