简体   繁体   中英

Core data and iCloud sync not working in live App

Just finished and app that uses core data and iCloud sync. The app is just working fine while testing on the simulator and on devices: adding text and images to the persistent store without problems, all data is restored and all devices: on the simulator and real iPhones. I did a lot of tests like deleting the App from the phone and simulators and the data persists every time I reinstall/run the App.

Now the App is "live" in the App store but the data is not syncing between devices. I have installed on two iPhones using the same Apple username/ID, added records on both devices and the data is not restored or duplicated on each phone as expected.

Any ideas?

I did not know that, but once the App is approved, we need to deploy the schema to production, otherwise Cloudkit will not go live.

To do so, go to icloud.developer.apple.com, on your dashboard, click on the gear icon and "Deploy Schema to Production".

在此处输入图片说明

Hope this helps others with the same dilema ;)

您还需要将权利文件中的com.apple.developer.icloud-container-environment密钥设置为“生产”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM