SQLite数据库副本 [英] SQLite Database Copy

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

问题描述


是否有必要将本地Database.sqlite复制到ios环境中的Documents目录?
如果是,那么请解释或引用链接..

Is it is necessary to copy my local Database.sqlite to Documents directory in ios environment? If Yes .,then please explain or refer link..


推荐答案

你需要复制它,因为如果你把它放在你的应用程序主包上​​,它将被只读,这不是你想要的。因此,您必须将.sqlite复制到Documents目录或任何具有写入权限的目录中。

You need to copy it because if you put it on your app main bundle, it will be readOnly, and that's not what you want. So you must copy your .sqlite in Documents directory, or whatever directory where you have write permission.

这篇关于SQLite数据库副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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