From 454dc2cd4aedfcdee7e84d684c325cc2e8bb30e3 Mon Sep 17 00:00:00 2001 From: Amir Abbas Mousavian Date: Mon, 5 Jun 2017 21:12:55 +0430 Subject: [PATCH] Fixing AirDrop failure when using relative urls --- TTOpenInAppActivity/TTOpenInAppActivity.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TTOpenInAppActivity/TTOpenInAppActivity.m b/TTOpenInAppActivity/TTOpenInAppActivity.m index 322a211..3185a2a 100755 --- a/TTOpenInAppActivity/TTOpenInAppActivity.m +++ b/TTOpenInAppActivity/TTOpenInAppActivity.m @@ -162,7 +162,8 @@ - (NSString *)UTIForURL:(NSURL *)url - (void)openDocumentInteractionControllerWithFileURL:(NSURL *)fileURL { // Open "Open in"-menu - self.docController = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; + // To workaround incompatibility of relative urls with AirDrop feature. We send absolute url to docController + self.docController = [UIDocumentInteractionController interactionControllerWithURL:[fileURL absoluteURL]]; self.docController.delegate = self; self.docController.UTI = [self UTIForURL:fileURL]; BOOL sucess; // Sucess is true if it was possible to open the controller and there are apps available