1

我已经使用 SQLite 数据库制作了 iOS 应用程序......

为此,我阅读了 Apple 的指南,发现“用户可以将文件存储在 /Documents 目录中”

在我的应用程序中,我使用的是单模式登录。为此,我将所有用户数据(基本上是 Sqlite db)存储到 Documents 目录。数据库也存在于同一目录中,其中包含有关从 Web 下载的详细信息。

My question is,
1. Should I have to change the storing file location instead of to the Documents directory?
2. Where should my database file be placed?
3. don't want to delete database file after user deleting Apps.(if user installed again i want to show that same db)

如果我在用户从设备中删除应用程序后将其放入 Documents 目录,则会删除所有文件。

请在这个问题上指导我。提前致谢。

4

1 回答 1

2
  1. & 2.:使用文档目录很好。
  2. 删除应用程序后,您将无法保留数据。更好的方法是使用用户帐户,其中一个人的数据库副本存储在服务器上。如果他们重新安装,用户只需登录并下载他们的帐户信息。(请参阅 Parse.com 了解一些很棒的方法)。
于 2013-07-23T14:17:40.577 回答