Open hisohiso3b opened 9 months ago
👋 @hisohiso3b
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!
I have the same error and I fear @hisohiso3b's solution does not work. While it prevents the error, it also prevents loading the content of the iframe, at least for me. In my case, I am loading a TinyMCE editor. This only applies to iOS, not to Android.
still happening only with ios working well with android using 6.0.0
@hisohiso3b can you post your answer I am not comfortable with swift code.
@Sumit258000
This issue is occurring because the Swift implementation of the inappwebview
library does not consider iframes and is blocking all iframe communications.
As suggested in the Stack Overflow answer, allowing communications for frames other than the main frame (i.e., iframes) by using decisionHandler(.allow)
will enable the communications.
I cloned the library locally and made the fix directly. However, it is too cumbersome, and I do not recommend this approach at all. I suggest contacting the developers, creating a pull request, or considering migrating to a library that does not have this issue.
@pichillilorenzo
but, inappwebview is pretty libraly. love it. best libraly. really reduce my larger time,,thankyou.. and maybe someone recreate all of their code,, I almost gave up
@hisohiso3b I would appreciate if you could share your branch or code as I have no knowledge of Swift. Thanks
Environment
Device information:
Description
Expected behavior:
it should display iframe contents
Current behavior:
it displays blank screen
Steps to reproduce
if I try to display the following iframe with InAppWebView, the content will be blank.
https://jsfiddle.net/6bo8drk1/
Images
Stacktrace/Logcat
no error on web inspector console log