Search code examples
iosobjective-ciphoneipadplist

How to Open an iPad/iPhone app through a mail link?


I have developed a universal iPhone/iPad app. I need to open this app through a mail file link(with some extension like .xyz) i,e when I click the link in mail(opened through safari or some other web servers) my app should launch and also the file contents must be loaded inside the app. What are all the settings I need to do in .plist file? And how to handle the file contents once loaded at launch? Can anybody help me how to do this?

Any help will be greatly respected. Thank


Solution

  • Implementing Support for Custom File Formats is a great way to get started. Yes, you need to define the document types in your Info.plist and then when your app gets launched by opening this kind of files you get a dictionary in your application:didFinishLaunchingWithOptions: app delegate method with info about it, including the file path. How you handle the file after that depends on file type and what you want to do with it.