简体   繁体   English

使用iCloud放弃核心数据,仅将核心数据的sqlite文件存储/加载到iCloud存储中

[英]Abandon Core data with iCloud and just Store / Load sqlite file of core data into iCloud storage

I'm making core data base app. 我正在制作核心数据库应用程序。 and I struggled to sync core data via iCloud on multiple devices and It's failed. 而且我很难通过iCloud在多个设备上同步核心数据,但是失败了。 and I noticed tons of developers are in the same area with me. 我注意到成千上万的开发人员和我在同一地区。

https://devforums.apple.com/message/770288#770288 https://devforums.apple.com/message/770288#770288

http://www.jumsoft.com/2013/01/response-to-sync-issues/ http://www.jumsoft.com/2013/01/response-to-sync-issues/

so please don't say there is better way to sync it or re-connect devices on syncing. 因此请不要说有更好的同步方法或同步时重新连接设备。 We know that core data with iCloud is something that we have to avoid now. 我们知道,现在必须避免使用iCloud的核心数据。 and I wasted half of year. 我浪费了半年

What I'm trying to do now is that just storing sqlite file of core data into iCloud storage so that I can use it like a syncing. 我现在想要做的就是将核心数据的sqlite文件存储到iCloud存储中,以便像同步一样使用它。 (please don't say it's not sync. I don't want talk about conflict issue now) (and size of my sqlite file is quite small) But I'm facing several issues and don't know what's the best way to do it. (请不要说它不同步。我现在不想谈论冲突问题)(而且我的sqlite文件的大小很小),但是我遇到了几个问题,不知道最好的方法是什么它。 I don't have much time because I wasted much time already. 我没有太多时间,因为我已经浪费了很多时间。

My Question is 我的问题是

  1. Apple doesn't allow to store sqlite file on iCloud ? 苹果不允许在iCloud上存储sqlite文件吗?
  2. Using UIDocument with iCloud is best way to do it? 最好将UIDocument与iCloud一起使用?

The reason why I'm looking UIDocument with iCloud is that It doesn't seem to work well that just storing and loading from the document folder of the iCloud ubiquetes storage. 我使用iCloud查找UIDocument的原因是,仅从iCloud ubiquetes存储的文档文件夹进行存储和加载似乎效果不佳。 but UIDocument with iCLoud file syncing seems working quite well. 但是带有iCLoud文件同步的UIDocument似乎运行得很好。

So Do you think It's good idea? 那么,您认为这是个好主意吗? who would go together? 谁会一起去?

Thanks 谢谢

Bright Lee 李光耀

It's not that Apple doesn't allow SQLite files in iCloud-- it's that they warn you it's a really bad idea to do so. 这并不是说苹果不允许在SQLite的文件iCloud--那就是他们提醒你这是一个非常糟糕主意,这样做。 Corruption of the file is very likely, since the odds of changing it while it's open are high. 文件很可能会损坏,因为打开时更改文件的几率很高。

If your data store really is quite small, consider using the ubiquitous key value store instead. 如果您的数据存储区确实很小,请考虑使用无处不在的键值存储区。

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

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