title: cordova: inappbrowser cannot be closed because of wkwebview plugin in ios
body: <p>I am using plugins cordova-plugin-inappbrowser and cordova-plugin-wkwebview in my app with ios.
  But loadstop event does not work so because of this issue I am also  not able to close inappbrowser on loadstop event.</p>
  
  <p>It works perfectly fine without wekwebview.</p>
  
  <p>I added code of example project to reproduce this issue:</p>
  
  <p><strong>config.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!-- config.xml reference: https://build.phonegap.com/docs/config-xml --&gt;
  &lt;widget xmlns     = "http://www.w3.org/ns/widgets"
          xmlns:gap = "http://phonegap.com/ns/1.0"
          id        = "com.phonegap.helloworld"
          version   = "1.0.0"&gt;
  
      &lt;name&gt;Hello World&lt;/name&gt;
  
      &lt;description&gt;
          Hello World sample application 
      &lt;/description&gt;
  
      &lt;author href="http://phonegap.com" email="support@phonegap.com"&gt;
          PhoneGap Team
      &lt;/author&gt;
  
  rmission on your app, which PhoneGap requires.
      --&gt;
      &lt;preference name="permissions"                value="none"/&gt;
  
  
      &lt;preference name="auto-hide-splash-screen"    value="true" /&gt;        
  
  
      &lt;gap:plugin name="cordova-plugin-wkwebview" source="npm" /&gt;
      &lt;gap:plugin name="cordova-plugin-inappbrowser" source="npm" /&gt;
      &lt;gap:plugin name="org.crosswalk.engine" spec="1.3.0" source="pgb" /&gt; 
  
      &lt;icon src="icon.png" /&gt;
      &lt;icon src="res/icon/android/icon-36-ldpi.png"   gap:platform="android"    gap:qualifier="ldpi" /&gt;
      &lt;icon src="res/icon/android/icon-48-mdpi.png"   gap:platform="android"    gap:qualifier="mdpi" /&gt;
      &lt;icon src="res/icon/android/icon-72-hdpi.png"   gap:platform="android"    gap:qualifier="hdpi" /&gt;
      &lt;icon src="res/icon/android/icon-96-xhdpi.png"  gap:platform="android"    gap:qualifier="xhdpi" /&gt;
      &lt;icon src="res/icon/blackberry/icon-80.png"     gap:platform="blackberry" /&gt;
      &lt;icon src="res/icon/blackberry/icon-80.png"     gap:platform="blackberry" gap:state="hover"/&gt;
      &lt;icon src="res/icon/ios/icon-57.png"            gap:platform="ios"        width="57" height="57" /&gt;
      &lt;icon src="res/icon/ios/icon-72.png"            gap:platform="ios"        width="72" height="72" /&gt;
      &lt;icon src="res/icon/ios/icon-57-2x.png"         gap:platform="ios"        width="114" height="114" /&gt;
      &lt;icon src="res/icon/ios/icon-72-2x.png"         gap:platform="ios"        width="144" height="144" /&gt;
      &lt;icon src="res/icon/webos/icon-64.png"          gap:platform="webos" /&gt;
      &lt;icon src="res/icon/windows-phone/icon-48.png"  gap:platform="winphone" /&gt;
      &lt;icon src="res/icon/windows-phone/icon-173.png" gap:platform="winphone"   gap:role="background" /&gt;
  
      &lt;!-- Define app splash screen for each platform. --&gt;
      &lt;gap:splash src="res/screen/android/screen-ldpi-portrait.png"       gap:platform="android" gap:qualifier="port-ldpi" /&gt;
      &lt;gap:splash src="res/screen/android/screen-mdpi-portrait.png"       gap:platform="android" gap:qualifier="port-mdpi" /&gt;
      &lt;gap:splash src="res/screen/android/screen-hdpi-portrait.png"       gap:platform="android" gap:qualifier="port-hdpi" /&gt;
      &lt;gap:splash src="res/screen/android/screen-xhdpi-portrait.png"      gap:platform="android" gap:qualifier="port-xhdpi" /&gt;
      &lt;gap:splash src="res/screen/blackberry/screen-225.png"              gap:platform="blackberry" /&gt;
      &lt;gap:splash src="res/screen/ios/screen-iphone-portrait.png"         gap:platform="ios"     width="320" height="480" /&gt;
      &lt;gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png"      gap:platform="ios"     width="640" height="960" /&gt;
      &lt;gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios"     width="640" height="1136" /&gt;
      &lt;gap:splash src="res/screen/ios/screen-ipad-portrait.png"           gap:platform="ios"     width="768" height="1024" /&gt;
      &lt;gap:splash src="res/screen/ios/screen-ipad-landscape.png"          gap:platform="ios"     width="1024" height="768" /&gt;
      &lt;gap:splash src="res/screen/windows-phone/screen-portrait.jpg"      gap:platform="winphone" /&gt;
  
  
      &lt;access origin="*"/&gt;
      &lt;!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin --&gt;
      &lt;!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html --&gt;
      &lt;plugin name="cordova-plugin-whitelist" version="1" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;platform name="android"&gt;
          &lt;allow-intent href="market:*" /&gt;
      &lt;/platform&gt;
      &lt;platform name="ios"&gt;
          &lt;allow-intent href="itms:*" /&gt;
          &lt;allow-intent href="itms-apps:*" /&gt;
      &lt;/platform&gt;
  
  &lt;/widget&gt;
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
      &lt;head&gt; 
  
          &lt;meta charset="utf-8" /&gt;
          &lt;meta name="format-detection" content="telephone=no" /&gt;
          &lt;meta name="msapplication-tap-highlight" content="no" /&gt;
          &lt;!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --&gt;
          &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /&gt;
          &lt;script type="text/javascript" src="js/jquery-1.10.2.js"&gt;&lt;/script&gt;
          &lt;title&gt;Hello World&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt; 
            &lt;br&gt;&lt;br&gt;&lt;br&gt;
                  &lt;button onclick="login()"&gt;Open web&lt;/button&gt;
  
          &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
  
               function login(){
  
                  var ref = window.open('http://www.google.com', '_blank', 'location=no');
  
                  ref.addEventListener('loadstop', function(event){
                      alert('from load stop');
                      ref.close();                
              });
      }
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It works perfectly fine if android but this issue is in ios only.
  I am using phonegap build to build app.</p>
  
  <p>I researched a lot but could not find any perfect solution yet.</p>
  
  <p>I'll really appreciate any contribution.
  Thanks</p>