title: AngularJS on WKWebView: any solution for handling file:// on iOS 9?
body: <p>I am porting a huge angularJS app to iOS 9 and wanted to benefit from WKWebView (migrating from UIWebView). The app is locally self contained, hence all files are served for the app main bundle using file:// protocol.</p>
  
  <p>Unfortunately, it sounds WKWebView originally breaks file:// protocol on iOS 8.x, but some light were casted when I saw the brand new iOS 9 loadFileURL(basePath:, allowingReadAccessToURL:) API.</p>
  
  <pre><code>let readAccessPath = NSURL(string:"app", relativeToURL:bundleURL)?.absoluteURL
  webView.loadFileURL(basePath!, allowingReadAccessToURL:readAccessPath!)
  </code></pre>
  
  <p>Alas, while I set allowingReadAccessToURL to the root folder within my bundle (app/), I only got the "index file", no asynchronous file are loaded.</p>
  
  <p>Anyone having some experience with that issue?</p>
  
  <p>[UPDATE] I see my initial issue description wasn't accurate enough. I do have my HTML running. But my asynchronous angularJS calls are actually blocked by security watchdog in the WebKit framework.</p>
  
  <p><a href="https://i.stack.imgur.com/qGoDD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qGoDD.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/mchrQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mchrQ.png" alt="enter image description here"></a></p>