Open YoofiBP opened 2 months ago
👋 @YoofiBP
NOTE: This comment is auto-generated.
Are you sure you have already searched for the same problem?
Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!
If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.
In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE]
or ios WKWebView [MY ERROR HERE]
keywords.
Following these steps can save you, me, and other people a lot of time, thanks!
Environment
Device information: Simulator and 11 Pro Max
I have added the plugin for in app web view to my flutter project. I have html content as string with file urls embedded in media tags and want to render this in my web view
Expected behavior: Files load on all platforms
Current behavior: The local file urls resolve on Android but not on iOS. I have added the required options from the docs but still not clear how to get these to show in IOS
Steps to reproduce
HTML Content:
<p> Let's see if this works</p><p> <img src="file:///var/mobile/Containers/Data/Application/A9C87532-47D9-4959-B2ED-E589AFF11F22/Documents/media/institutions/1/courses/1/sessions/7596/img1_1603362234.png" alt="" width="100%"> </img></p><p></p><p> Another image</p><p> <img src="file:///var/mobile/Containers/Data/Application/A9C87532-47D9-4959-B2ED-E589AFF11F22/Documents/media/institutions/1/courses/1/sessions/7596/img2_1603362234.jpeg" alt="" width="100%"> </img></p>
InAppWebView( key: GlobalKey(), // windowId: controller.currentPage.value, initialSettings: InAppWebViewSettings( allowFileAccessFromFileURLs: true, allowUniversalAccessFromFileURLs: true, allowFileAccess: true, allowContentAccess: true ), initialData: InAppWebViewInitialData(data: loadHtmlFromAssets(content)), initialOptions: InAppWebViewGroupOptions( crossPlatform: InAppWebViewOptions( supportZoom: true, javaScriptEnabled: true, disableHorizontalScroll: true, disableVerticalScroll: false, allowFileAccessFromFileURLs: true, allowUniversalAccessFromFileURLs: true ), ), );
Info.plist
`<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">