Search code examples
iphoneios4

Programmatically launch registered viewer and wait for exit


Within my sandbox, I have PDFs, DOCs, XLSs, etc. How do I launch the native viewer for the file and wait for the viewer to exit?

In the Microsoft would, I would ShellExectue or CreateProcess/WaitForSingleObject. In Unix, I would fork/exec/wait. But I can't seem to locate the information for Apple's gear.

How does one programmatically launch registered viewer and wait for exit?


Solution

  • You can load the file into a UIWebView, but you can’t launch another application and then wait for it to close.