From f97b62c51dabd1b0d5fed8a36ef22fa52b52993f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 24 Jun 2016 19:24:00 -0400 Subject: [PATCH] Move extensioncontext parsing into ViewDidLoad due to lifecycle conflicts with Safari. Fixed typo with plain-text activation predicate. --- src/iOS.Extension/Info.plist | 28 +++++++++++----------- src/iOS.Extension/LoadingViewController.cs | 9 ++++--- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/iOS.Extension/Info.plist b/src/iOS.Extension/Info.plist index 08d004ebc..99f5931e2 100644 --- a/src/iOS.Extension/Info.plist +++ b/src/iOS.Extension/Info.plist @@ -30,20 +30,20 @@ extension NSExtensionActivationRule SUBQUERY ( - extensionItems, - $extensionItem, - SUBQUERY ( - $extensionItem.attachments, - $attachment, - ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plan-text" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.find-login-action" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.save-login-action" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.change-password-action" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.fill-webview-action" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.fill-browser-action" - ).@count == $extensionItem.attachments.@count - ).@count == 1 + extensionItems, + $extensionItem, + SUBQUERY ( + $extensionItem.attachments, + $attachment, + ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.find-login-action" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.save-login-action" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.change-password-action" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.fill-webview-action" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.fill-browser-action" + ).@count == $extensionItem.attachments.@count + ).@count == 1 NSExtensionPointName com.apple.ui-services NSExtensionPointVersion diff --git a/src/iOS.Extension/LoadingViewController.cs b/src/iOS.Extension/LoadingViewController.cs index 79441c0f1..6512feabc 100644 --- a/src/iOS.Extension/LoadingViewController.cs +++ b/src/iOS.Extension/LoadingViewController.cs @@ -30,11 +30,6 @@ namespace Bit.iOS.Extension base.ViewDidLoad(); View.BackgroundColor = UIColor.FromPatternImage(new UIImage("bg.png")); _context.ExtContext = ExtensionContext; - } - - public override void ViewDidAppear(bool animated) - { - base.ViewDidAppear(animated); if(!Resolver.IsSet) { @@ -63,7 +58,11 @@ namespace Bit.iOS.Extension break; } } + } + public override void ViewDidAppear(bool animated) + { + base.ViewDidAppear(animated); PerformSegue("seque", this); }