How can I read documents from other iOS apps?

♀尐吖头ヾ 提交于 2019-12-11 13:08:52

问题


I have an app which is similar to an FTP client. I can download various types of documents in it. (DOC, XLS, PDF, PPT etc)

Now, I want to read those documents in another application. For example: Suppose I download a PDF in my app, it is possible to read from AirSharing or File Magnet?


回答1:


I don't think it's possible for other applications to access Library folders owned by other apps, and definitely not private application folders.

Document handling might handle what you want only to an extent - not the files that don't have their types registered to any app, and only at a one by one file basis, essentially duplicating the files as well.

If this is your app you are talking about, you can implement the Open In feature which is part of the Document Interaction in iOS, which will allow the user to access the file in any app that is registered to handle the extension/UTI.

In particular, these methods:

UIDocumentInteractionController  
– presentOpenInMenuFromRect:inView:animated: 
– presentOpenInMenuFromBarButtonItem:animated:


来源:https://stackoverflow.com/questions/4201407/how-can-i-read-documents-from-other-ios-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!