I found that some application, such as "GoodReader" or "Docs to Go", after installation, can be activated using the "Open" function when opening an email attachment in the Mail application. How to add this function to bind my application to some documents (e.g. pdf)?
The idea is to have an easy way to get email attachments that will be used directly inside the application.
Edit: I found this document and think it matches my question:
Document Support
The application can now register the types of files that it supports with the system and receive notifications when it is necessary to open a file of this type. He does this by including the key CFBundleDocumentTypesin his file Info.plist. You can also expect that an application that registers one or more file types will open these file types at some point later. He does this by implementing the
application:didFinishLaunchingWithOptions:application in the deletion and find the file in the key of the UIApplicationLaunchOptionsURLKeyprovided dictionary. In addition to being able to open files of known types, there is an addition
UIDocumentInteractionControllerclassto the structure UIKit. This class provides custom
to manage files that your application does not know how to open them. The interaction controller document provides options for previewing the contents of a file in place or opening it in a different expression. Document interaction controllers are especially useful for email applications or applications that can download files from the network.
source
share