From 8c1ac478a247a5da3669ed251060a83d8dfe1065 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 2 Jun 2016 18:09:25 -0400 Subject: [PATCH] use js key for browser provider --- src/iOS.Extension/ActionViewController.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/iOS.Extension/ActionViewController.cs b/src/iOS.Extension/ActionViewController.cs index 7b5ac021c..8ab034816 100644 --- a/src/iOS.Extension/ActionViewController.cs +++ b/src/iOS.Extension/ActionViewController.cs @@ -131,14 +131,20 @@ namespace Bit.iOS.Extension private void Button_TouchUpInside(object sender, EventArgs e) { NSDictionary itemData = null; + if(ProviderType == UTType.PropertyList) + { + var fillScript = new FillScript(Details); + var scriptJson = JsonConvert.SerializeObject(fillScript, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); + var scriptDict = new NSDictionary(AppExtensionWebViewPageFillScript, scriptJson); + itemData = new NSDictionary(NSJavaScriptExtension.FinalizeArgumentKey, scriptDict); + } if(ProviderType == UTTypeAppExtensionFindLoginAction) { itemData = new NSDictionary( AppExtensionUsernameKey, "me@example.com", AppExtensionPasswordKey, "mypassword"); } - else if(ProviderType == UTType.PropertyList - || ProviderType == UTTypeAppExtensionFillBrowserAction + else if(ProviderType == UTTypeAppExtensionFillBrowserAction || ProviderType == UTTypeAppExtensionFillWebViewAction) { var fillScript = new FillScript(Details);