I'm using UIDocumentInteractionController to open a file in another app, DropBox.
What i'm trying to do is open the file in another specific app , but i only managed so far to display the supported apps and allowing the user to choose.
UIDocumentInteractionController *udi = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath: jpgPath]];
[udi retain];
CGRect r = CGRectMake(0, 0, 300, 300);
[udi presentOpenInMenuFromRect:r inView:self.view animated:YES];
This presents a list of apps supported, but i want to directly open the file with dropbox, without the options box. Any ideas?
I'd be delighted to be contradicted, but I think this is not possible (at least up to and including iOS 4).
The normal way to open a file in another application is to use a Custom URL scheme. (See the documentation for openURL: in the UIApplication Class Reference and also Implementing Custom URL Schemes in the iOS Application Programming Guide.) To the best of my knowledge, Dropbox have not implemented a Custom URL Scheme. And, given that, this approach is closed.
UIDocumentationController is pretty opaque. You can coax it into telling you whether or not there is any application on the device that will open your file. But it's not clear you can do much else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With