在哪里存储核心数据文件?

编程入门 行业动态 更新时间:2024-10-26 22:16:31
本文介绍了在哪里存储核心数据文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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.

更多推荐

在哪里存储核心数据文件?

本文发布于:2023-11-07 22:26:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567604.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:核心   文件   数据

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!