【发布时间】:2013-05-10 11:47:16
【问题描述】:
我正在使用来自 Phonegap (https://github.com/phonegap/phonegap-plugins/tree/master/iOS/ExternalFileUtil) 的 ExternalFileUtil-Plugin。但它只适用于 iPhone。它适用于带有 iOS 6.0 和 6.1 的 iPhone 模拟器,适用于带有 iOS 6.x 的 iPhone 4 和 5。但它不适用于 iPad、模拟器、设备和带有 iOS 5.1 的 iPod Touch 上也不起作用;(
我尝试了http://www.tricedesigns.com/2012/08/15/open-with-in-ios-phonegap-apps/ 上的 cmets 中描述的任何建议,但没有任何帮助。
我认为以下几行必须调整:
UIDocumentInteractionController *controller = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
controller.delegate = self;
controller.UTI = uti;
[controller retain];
CDVViewController* cont = (CDVViewController*)[ super viewController ];
CGRect rect = CGRectMake(0, 0, cont.view.bounds.size.width, cont.view.bounds.size.height);
[controller presentOptionsMenuFromRect:rect inView:cont.view animated:YES];
有人有什么建议吗?
【问题讨论】:
标签: ios objective-c cordova phonegap-plugins