fix(ios): Utils.openFile (#8914)

closes https://github.com/NativeScript/NativeScript/issues/8913
This commit is contained in:
Nathan Walker
2020-09-29 08:18:04 -07:00
committed by GitHub
parent 65b1cdbae0
commit 647926ee28
3 changed files with 33 additions and 27 deletions

View File

@@ -11,7 +11,7 @@ export function openFile(filePath: string): boolean {
let path = iOSNativeHelper.isRealDevice() ? filePath.replace('~', appPath) : filePath;
const controller = UIDocumentInteractionController.interactionControllerWithURL(NSURL.fileURLWithPath(path));
controller.delegate = <UIDocumentInteractionControllerDelegate>new iOSNativeHelper.UIDocumentInteractionControllerDelegateImpl();
controller.delegate = iOSNativeHelper.createUIDocumentInteractionControllerDelegate();
return controller.presentPreviewAnimated(true);
} catch (e) {