在icloud中存储sqlite数据库? [英] storing sqlite database in icloud?

查看:459
本文介绍了在icloud中存储sqlite数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在退出应用程序后将SQlite存储到iCloud中并在我们打开应用程序时拉动?但是教程告诉我们只使用核心数据,是不是可以通过Sqlite来实现

is it possible to store SQlite into iCloud after exiting application and pulling when we open application ?but tutorials are telling to use core data only, is not possible to do it through Sqlite only?

推荐答案

简短的回答是你不应该使用SQLite和iCloud,教程是正确的。来自 iOS应用编程指南

The short answer is that you shouldn't use SQLite and iCloud, the tutorials are right. From the iOS App Programming Guide,


只有当您的应用使用Core Data管理该数据库时,才可以将iCloud与SQLite数据库配合使用。不支持使用SQLite接口访问iCloud中的实时数据库文件,这可能会损坏您的数据库。

Using iCloud with a SQLite database is possible only if your app uses Core Data to manage that database. Accessing live database files in iCloud using the SQLite interfaces is not supported and will likely corrupt your database.

然而,我并不完全确定你想做你想做的事。请记住,如果用户已将设备备份启用到iCloud,则将备份应用程序的文档目录。如果您计划将其用作应用程序实例之间的同步工具(例如用户的iPhone和iPad之间)或平台之间(以及iOS和OS X版本),那么在您的应用程序中启用iCloud真的才有意义。申请)。

However I'm not entirely sure you want to do what you think you want to do. Remember that if the user has enabled device backup to iCloud, your application's documents directory will be backed up. It really only makes sense to enable iCloud in your application if you're planning to use it as a synchronization tool between instances of your application (for instance between the user’s iPhone and iPad) or between platforms (and iOS and an OS X version of the application).

这篇关于在icloud中存储sqlite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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