Forum Xamarin.Forms

Loading css / js files from html file WKWebView on Xamarin Forms

Hello everyone,

Since few days i have a problem with WKWebView on Xamarin forms...

Before updated Xamarin Forms, i had a WebView (pathologie_1.html) on the page MainPage.xaml with custom renderer iOS. But the WebViewRenderer is obselete, so i changed this to WkWebViewRenderer.

But for now, all the links (style.css, app.js) includes in my html file (pathologie_1.html) are not loaded... I replace their links with javascript fonction (EvaluateJavascript).

The path of assets files is : /var/mobile/Containers/Data/Application/CD3CE15C-478A-4CA5-BA01-A07C91A72166/Library/1/ressources/ressources/view.css
The path of html file is : /var/mobile/Containers/Data/Application/CD3CE15C-478A-4CA5-BA01-A07C91A72166/Library/1/ressources/pathologies/pathologie_1.html

I have tested many solutions but i can't find...

Thanks for your answers !!


  • AbesoddyAbesoddy Member ✭✭

    Here is the link of the depository :

    The application contains a zip file ( which is unzipped the first time the application is launched. An open webview button is present on the home page. This opens a new page with the webview which will look for an html file in local storage then must replace the links of the css files in this html page. But it does not work...

Sign In or Register to comment.