简体   繁体   English

如何从其他iOS应用程序读取应用程序文档目录中的文档?

[英]How can I read documents in my app's Document directory from other iOS apps?

I have an app in which i am downloading pdf files from server and store them locally in document directory. 我有一个应用程序,我正在其中从服务器下载pdf文件,并将其本地存储在文档目录中。 Now, i want to read that files outside my app , means i want to read that files using other pdf reader applications, 现在,我想在我的应用程序之外读取这些文件,这意味着我想使用其他pdf阅读器应用程序来读取这些文件,

How can I Read those files using other apps? 如何使用其他应用程序读取这些文件?

I came across same question Here , it has good answer but it is too old. 我在这里遇到了同样的问题,它的回答很好,但是太旧了。 at that time it was not possible so is that possible right now? 当时不可能,现在可以吗?

Is it possible to save those files in iBooks? 是否可以将这些文件保存在iBooks中?

I want to make one thing clear 我想澄清一件事

"I don't want to open the app supporting pdf files, i just want to open pdf files stored within my app with other app. like we can access Photos app & get images from device like that i want to open pdf files stored within my app" “我不想打开支持pdf文件的应用程序,我只想与其他应用程序一起打开存储在我的应用程序中的pdf文件。就像我们可以访问“照片”应用程序并从设备中获取图像一样,我想打开存储在其中的pdf文件我的应用程序”

You can open file URLs with UIApplication's openURL: method. 您可以使用UIApplication的openURL:方法打开文件URL。 Because of sandboxing, other apps could not access any files within your application's Documents folder. 由于使用沙箱,其他应用程序无法访问应用程序的“文档”文件夹中的任何文件。

You need to use UIDocumentInteractionController to open documents that you download or create in other applications. 您需要使用UIDocumentInteractionController打开在其他应用程序中下载或创建的文档。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将文件从其他App复制到iOS中ma的Documents目录中? - How to copy the file from other App to ma App's documents directory in iOS? 如何阅读和打开iOS应用程序文档目录中的文件? - How do I read and open files in an iOS app's documents directory? 我可以访问应用沙箱范围之外的其他iOS应用信息吗? - Can I access information about other iOS apps beyond the scope of my app's sandbox? 我可以在 Xcode 中创建一个 Documents 目录,并通过 UI 将我的 iOS 应用程序的文件放入其中吗? 如果是这样,如何? - Can I create a Documents directory in Xcode, and put files in it for my iOS app through the UI. If so, how? 为什么我不能将文件保存到我的iOS应用程序/ Documents目录中? - Why can't I save files to my iOS apps /Documents directory? 如何从iOS中的文档目录中读取文件 - How to Read a file from documents directory in iOS 如何保护应用程序文档目录中的文件免受外部工具(iFunbox / iTools等)的读取 - How can I protect my files in app's document directory from reading by external tools(iFunbox/iTools etc) 如何让我的 iOS 应用程序相互通信? - How can I make my iOS apps talk to each other? 为什么我的iOS App的“文档”目录成为文件? - Why my iOS App's Documents directory became a file? 如何防止其他iOS / Android应用程序使用我的RESTful API? - How can I prevent other iOS/Android apps from using my RESTful API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM