From 64c15579ed85bb036eaf9be338331ae703b1fae4 Mon Sep 17 00:00:00 2001 From: Aleksi Lahikainen Date: Tue, 8 Sep 2020 16:18:33 +0300 Subject: [PATCH] Apply same fix for open with preview functionality --- src/ios/FileOpener2.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ios/FileOpener2.m b/src/ios/FileOpener2.m index 74e7928..3bc1d66 100644 --- a/src/ios/FileOpener2.m +++ b/src/ios/FileOpener2.m @@ -118,6 +118,7 @@ NSString* callbackId = nil; nil ]; pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:jsonObj]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; } }); } @@ -126,7 +127,11 @@ NSString* callbackId = nil; @implementation FileOpener2 (UIDocumentInteractionControllerDelegate) - (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller { - [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; +} + +- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller { + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; } - (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller {