iPhone使用iTunes传输文件,但不允许用户查看所有文档目录?

发布于 2024-10-06 01:34:29 字数 209 浏览 0 评论 0原文

听起来这不可能,但我还是会问。

在我的应用程序中,我在文档目录中存储了大量图像和 plist。

我想在应用程序中实现一个 PDF 阅读器,允许用户通过 iTunes 将 PDF 加载到应用程序中。我不希望用户能够查看/访问文档目录的内容,因为如果他们弄乱这些文件,可能会导致应用程序意外执行。

这可能吗,或者是否可以将我的 plist 和图像放在其他地方?

It doesn't sound like this is possible, but I will ask anyway.

In my app, I store a lot of images and plists in the documents directory.

I would like to implement a PDF reader in the app that allows users to load their PDFs into the app via iTunes. I do not want the user to be able to see/access the contents of the documents directory since they could cause the app to perform unexpectedly if they messed with these files.

Is this possible, or is it possible to place my plists and images somewhere else?

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

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

发布评论

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

评论(1

明明#如月 2024-10-13 01:34:29

您需要在 Apple 注册才能看到此内容,但是 此页面应该为您提供所需的信息。

您需要将 UIFileSharingEnabled 键添加到 Info.plist 中。这将使用户能够访问应用程序的文档目录,并允许他们删除或添加文件。

本教程 给出了如何在 iPad 应用程序中设置 PDF 支持的示例。

You'll need to be registered with Apple to see this, but this page should give you the information you need.

You'll need to add a UIFileSharingEnabled key to Info.plist. This will give the user access to the Documents directory of the app, and let them remove or add files.

This tutorial gives an example of how to set up PDF support in an iPad app.

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