iOS模板的默认Core Data将数据存储在 NSDocumentDirectory 中的 .sqlite 文件中。
The default Core Data for iOS template stores data in an .sqlite file in the NSDocumentDirectory. The file is therefor visible if the iDevice is connected to iTunes and file sharing is enabled.
我想将目录更改为用户不可见的内容,并且我会选择 NSApplicationSupportDirectory 。这是正确的目录吗?
I would like to change the directory to something that is not visible to the user and I would choose the NSApplicationSupportDirectory. Is this the correct directory? What do other developers use?
推荐答案最好的地方(iPhone上)是Library文件夹,如下所述:
The best place (on the iPhone) is the Library folder, as described here:
如何在iPhone上获得可写入的路径?
该目录适用于您不希望用户能够访问的数据库见分享。
That directory is meant for things like databases that you do not want the user to be able to see through sharing.
更多推荐
在哪里存储核心数据文件?
发布评论