Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Important notice to iOS HybridWebView users

$
0
0

In the latest pre packages the iOS version is now using WKWebView instead of UIWebView. This is because the callbacks from WKWebView are easier and more robust. There is a bug in WKWebView which prevents loading from bundled resources and the fix is supposed to be in iOS 9. As a workaround if you are loading HTML from resources you will have to call a method to copy the HTML resource directory to a tmp directory where the WKWebView can use them (this includes also the JS files). The method is a static call HybridWebViewRenderer.CopyBundleDirectory and here is an example from the XLabs sample project, copying the HTML directory where the resources are:

https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/Samples/XLabs.Sample.iOS/AppDelegate.cs#L57

If you are not using the latest pre-release package yet then you will have to do this change when the next release comes out.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>