[IOS][WEBVIEW] Unable to run an iframe in a webview #22833
Labels
area-controls-webview
WebView
platform/iOS 🍎
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
Hello,
The aim of my application is to be able, in offline mode, to open an html archive downloaded earlier in an html wrapper consisting of an iframe, or else in online mode to simply display a URL in the webview (no problem with the the online mode).
So, for offline mode, I have an html file defined in MauiAsset, consisting of an iframe in which I'm going to replace the source with the path to my local file
All this works perfectly on Android, and also on iOS simulator.
On a physical iPhone, however, it's impossible. All I get is a blank screen.
Here the HTML Wrapper asset :
Here's the XAML code :
Here's the C# code
My iPhone console displays this error message:
WebPageProxy::didFailProvisionalLoadForFrame: frameID=25, isMainFrame=0, domain=<private>, code=-1100, isMainFrame=0
So I decided to test only the iFrame's operation by having it display any web page, and I got exactly the same error
Even with :
And if I set the source of my webview directly on www.google.com, it works.
Here my info.plist file :
And how I get the html formatted content :
I'm completely lost and I don't really understand what's going on, I have no other idea but to come and post here.
Steps to Reproduce
1 - Create a new MAUI App
2- Create a MauiAsset which consist of an html file with an iframe
3-Set the iframe src to www.google.com
4-Create a WebView in your XAML Page which load the MauiAsset as source
5- Run your iOS application
Link to public reproduction project repository
No response
Version with bug
8.0.21 SR4.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15 and more
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: