Call a third party app from another app
Is it possible to 开发者_高级运维launch any iPhone/iPad application from within another app? For example in my application if I want the user to read a document say a pdf file from any of the installed apps on iphone or an ipad say PDFReaderLite. How can i launch this app from my app.
How can we know which all installed apps support reading of documents and show a list to open with any of these apps from my app?
How do we get the URL Schemes for the installed apps?
You can use the UIDocumentInteractionController to show a list with installed apps that can handle the file.
UIDocumentInteractionController *controller = [[UIDocumentInteractionController interactionControllerWithURL:fileURL];
[controller presentOpenInMenuFromBarButtonItem:someBarItem animated:YES];
This shows a list of all apps that are registered for the filetype and opens an app if the user selects one.
精彩评论