Xam.Plugin.Webview icon indicating copy to clipboard operation
Xam.Plugin.Webview copied to clipboard

Embedded files locations on iOS

Open abrasat opened this issue 6 years ago • 2 comments

Where exactly inside the iOS project (Xamarin.Forms application) have to be placed the local *.html files (as embedded resources) to be found by WebView on iOS ? And if a parameter "file" has to be passed (main.html?file=pdfcontent/abc.pdf), where exactly inside the project has the local file (as embedded resource) to be located relatively to the *.html file ? For UWP and Android projects everything works fine, but for iOS I cannot get it working.

abrasat avatar Dec 20 '17 09:12 abrasat

Add it to the resources folder as a bundle resource. You do not need to define it with the file schema! See the samples in this repo :)

SKLn-Rad avatar Dec 21 '17 10:12 SKLn-Rad

Thx, the web page (html file) is now displayed. I still have problems passing a parameter (=?file=...) to it, the JavaScript code (pdf-js) does not find the file on iOS. The same JavaScript code works fine on Android and UWP.

abrasat avatar Dec 21 '17 10:12 abrasat