简体   繁体   English

没有iCloud的CoreData数据库同步吗?

[英]CoreData database syncing without iCloud?

With iCloud, you can sync your CoreData databases across multiple devices. 借助iCloud,您可以跨多个设备同步CoreData数据库。 This works by means of SQLite creating a transaction log that is replicated via the cloud. 这可以通过SQLite创建通过云复制的事务日志来实现。 I like that mechanism, by I don't want to tie it to iCloud and Apple's servers. 我喜欢这种机制,因为我不想将其绑定到iCloud和Apple的服务器。

Is there a way to enable this transaction log and manually replicate it using custom code and servers under my control? 有没有一种方法可以启用此事务日志并使用我控制下的自定义代码和服务器手动复制它?

No, at the moment the transaction logs are not exposed by any API. 否,目前没有任何API公开交易日志。 You can look at them on your Mac if you have iCloud enabled (they live in ~/Library/Mobile Documents/ ) to try to figure out how Apple is doing this and replicate it yourself. 如果启用了iCloud(它们位于~/Library/Mobile Documents/ ),则可以在Mac上查看它们,以尝试了解Apple的工作方式并自行复制。 Sounds like a very difficult problem though. 听起来这是一个非常困难的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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