有关iCloud +核心数据的问题 [英] Questions concerning iCloud + core data

查看:191
本文介绍了有关iCloud +核心数据的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用商店中有一个应用,使用coredata作为存储。我无法更新应用程序与iCloud同步作为新功能。按照apple的示例代码,我设法使我的核心数据存储在设备之间同步。

I have an app on the app store, that uses coredata as storage. I wan't to update the app with iCloud synchronization as new feature. Following apple`s sample code, I managed to have my core data storage synchronize between devices.

但是,当iCloud同步关闭/打开时,遇到问题在应用程序中只有一个设备,或当应用程序从设备中删除和重新安装。在这两种情况下,数据都不会同步回设备,虽然它在第二个设备(未禁用/重新安装)上可用。

However, I'm experiencing problems when either iCloud synchronization is turned off/on in the app on only one of the devices, or when the app is deleted from the device and the reinstalled. In both cases, data is not synchronized back to the device, although it is available just fine on a second device (which was not disabled/reinstalled).

所有存储被有效地完全擦除,当我从所有设备删除该应用程序,然后重新安装。通过我在控制台中获得几个合并通知(即使一些没有错误),我在设备的本地存储中看不到任何数据。

I also found that all storage is effectively erased completely, when I delete the app from all devices, and then reinstall. Althrough I get a couple of merge notifications in the console (even some without errors), I can't see no data in the local storage of the device.

浏览我的Mac上的移动文档文件夹仍然显示我的应用程序的icloud存储中的大量事务日志。

Browsing the mobile documents folders on my mac still reveals lots of transaction logs in the icloud storage of my app.

即使从所有设备删除应用程序,从头开始不会整理出来。

Even deleting the app from all devices and starting from scratch wont sort things out. I will end up in a situation where data is either only synced to one device, or not synced at all.

我不知道有没有什么我可以做的这个不一致的只有一个设备暂时禁用iCloud,或者应用程序从一个设备中删除时创建的状态?

I wonder if there is anything I can do about this inconsistent state that is created when only one device is temporarily iCloud disabled, or the app is deleted from ONE device?

对于我的代码,它的1:1副本

As for my code, its an 1:1 copy of the recipces example from apple.

推荐答案

Daniel Pasco 谈到了一起使用Core Data和iCloud < a>在NSConference 2012.该博客的一些注释:

Daniel Pasco talked about using Core Data and iCloud together at NSConference 2012. Some notes from that blog post:


使用-com.apple.coredata.ubiquity.logLevel 3启动消息日志中的垃圾邮件,说明Core Data和iCloud正在做什么。

launching with -com.apple.coredata.ubiquity.logLevel 3 to get a spamfest in the message log saying what Core Data and iCloud are doing.

这个演讲的结论似乎是,在这个阶段使用Core Data和iCloud没有准备好对方。

The conclusion from this talk appears to be that using Core Data and iCloud are really not ready for each other at this stage.

他在Github上发布了更新的Core Data Recipes项目这可能或可能不会解决您的问题。

He posted an updated Core Data Recipes project on Github which may or may not fix your problem.

这篇关于有关iCloud +核心数据的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆