<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - iOS 10 breaks Construct 2-made UIWebView Cordova apps"
   href="https://bugs.webkit.org/show_bug.cgi?id=162385">162385</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>iOS 10 breaks Construct 2-made UIWebView Cordova apps
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>iPhone / iPad
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>iOS 10
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>HTML DOM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ashley&#64;scirra.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>cdumez&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>iOS 10's UIWebView adds the global &quot;indexedDB&quot; property. In iOS 9, the presence of this was the de-facto way to detect WKWebView since it was missing in UIWebView (e.g. see here: <a href="http://stackoverflow.com/a/30495399/177222">http://stackoverflow.com/a/30495399/177222</a>). Now in iOS 10 all the apps built with UIWebView detect that they are WKWebView due to the addition of &quot;indexedDB&quot;. Due to various bugs and changes in the security model of WKWebView, we had to make some fairly significant changes to our engine to support it (see: <a href="https://www.scirra.com/blog/ashley/25/hacking-something-useful-out-of-wkwebview">https://www.scirra.com/blog/ashley/25/hacking-something-useful-out-of-wkwebview</a>). When UIWebView apps detect as WKWebView and apply our hacks, they fail to start up. Therefore there are now many iOS apps made with Construct 2 that no longer work on iOS 10.

I don't even know how we can work around this in the short term since in iOS 10, UIWebView and WKWebView appear to be identical to any kind of Javascript detection.

Ideas that could fix this:
- add an easy way to detect WKWebView from Javascript that will be robust across iOS releases, so we can update our framework then get everybody to re-publish their apps
- remove indexedDB from UIWebView so the de-facto detection that has been used for iOS 9 continues to work (should fix existing apps without any republishing)
- do both but then add indexedDB back to UIWebView for iOS 11, which should be enough time for all the updates and app re-publishing to happen</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>