简体   繁体   English

如果我不使用核心数据,如何使用iCloud Sync?

[英]How can I use iCloud Sync if I'm not using Core Data?

I've seen a few examples showing how to integrate iCloud with Core Data, but my app uses a handwritten SQLite persistence layer. 我已经看到了一些示例,展示了如何将iCloud与Core Data集成,但是我的应用程序使用了手写的SQLite持久层。

Am I just out of luck, or are there straightforward ways to do syncing and conflict resolution over iCloud with a non-Core Data database? 我是不是很幸运,或者是否有直接方法可以通过iCloud与非核心数据数据库进行同步和冲突解决?

"Straightforward" might not be the first word that comes to mind, but you can definitely use iCloud storage in non-Core Data apps. “直截了当”可能不是您要想到的第一个词,但是您绝对可以在非Core Data应用程序中使用iCloud存储。 You'll need to manage your storage engine, conflict resolutions, and data presentation yourself, however; 但是,您需要自己管理存储引擎,冲突解决方案和数据表示。 you don't get the "easy" merging and resolution that Core Data gets you. 您不会获得Core Data带来的“轻松”合并和解决方案。

Read up on the iCloud Storage guide for detailed info. 阅读《 iCloud存储指南》以获取详细信息。 There's a good checklist a little way down that guides you through setting up document-based storage in your app. 下方有一个很好的清单,可指导您在应用中设置基于文档的存储。

you should check out this stack overflow answer link it iCloud synk but for OSX application basically the same thing. 您应该查看此堆栈溢出答案,将其链接到iCloud synk,但对于OSX应用程序基本上是相同的。 just use .plist files. 只需使用.plist文件。 hope it helps. 希望能帮助到你。 It helped me on my mac app OSX app iClound synk 它对我的Mac App OSX App iClound synk有所帮助

iCloud tutorial part 1 iCloud教程第1部分

iCloud tutorial part 2 iCloud教程第2部分

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

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