iPhone/iPad 上的文件共享?

发布于 2024-09-25 17:22:07 字数 136 浏览 0 评论 0原文

我希望我的应用程序通过 itunes 文件共享来共享文件。现在所有文档文件夹 暴露给用户。问题是那里有某些我不想公开的文件(假设这些是“系统文件”)。我应该怎么办?如果无法“隐藏”文件,您认为最好将“系统文件”放在哪里?在库文件夹中?

谢谢

I want my app to share files via itunes file sharing. Right now all of the Documents folder
is exposed to the user. The problem is that there are certain files there (let's say these are "System files") that I don't want to expose. What should I do? And if it's not possible to "hide" files, where do you think it's best to put "System files"? In the Library folder?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡淡の花香 2024-10-02 17:22:07

Apple 有一个技术问答专门处理这个问题。

除了目录之外
之前记录过,整个
/库目录
期间一直被保留
更新和备份,除了
/库/缓存。
正因为如此,应用程序可以
创建自己的目录
/图书馆/和那些
目录将被保存在
备份和跨更新。到
最大限度地减少名称冲突的风险,
我们建议您将此命名为
仔细目录。例如,一个
名为私人文档的目录
会是一个不错的选择。

Apple has a Technical Q&A dealing with exactly this.

In addition to the directories
documented previously, the entire
/Library directory
has always been preserved during
updates and backups, except for
/Library/Caches.
Because of this, applications can
create their own directories in
/Library/ and those
directories will be preserved in
backups and across updates. To
minimize the risk of name collisions,
we recommend that you name this
directory carefully. For example, a
directory named Private Documents
would be a good choice.

风苍溪 2024-10-02 17:22:07

是的,Library 文件夹是一个不错的选择。 Documents 文件夹应保留用于存放用户的文档。或者,您可以在“系统文件”的文件名前加上 . 前缀,或将它们放入 Documents 文件夹的 .hidden 子文件夹中。据我所知,这些隐藏文件目前未显示在 iTunes 中。

Yes, the Library folder is a good choice. The Documents folder should be reserved for the user's documents. Alternatively, you can prefix the filenames of your "system files" with a . or put them in a .hidden subfolder of the Documents folder. Those hidden files are currently not shown in iTunes AFAIK.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文