Cordova-plugin-ionic-webview: White screen while using iframe on iOS

Created on 9 Aug 2019  路  9Comments  路  Source: ionic-team/cordova-plugin-ionic-webview

Hi,

I am trying to embed google maps embed api, but getting white screen. I am not getting errors in console and also not in the network tab.

Issue is only for iOS and not on android.

My Ionic info:-

macbook-pro:~ Tushar$ ionic info
[WARN] You are not in an Ionic project directory. Project context may be
       missing.

Ionic:

   Ionic CLI : 5.2.4

Utility:

   cordova-res : 0.6.0 
   native-run  : 0.2.8 

System:

   NodeJS : v10.15.0
   npm    : 6.4.1
   OS     : macOS Mojave

macbook-pro:~ Tushar$ 

Webview version

    <plugin name="cordova-plugin-ionic-webview" spec="^4.1.1">
        <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
    </plugin>

Thanks

Most helpful comment

Try adding on your config.xml
<allow-navigation href="*" />

It works fine But after I added it I can not open all links with https://
Has anyone come across this?

All 9 comments

Try adding on your config.xml
<allow-navigation href="*" />

Can the @deliverymanager method be used?
OR While the white screen You try tapping the screen a couple of times. It will show you the webpage.

Try adding on your config.xml
<allow-navigation href="*" />

It works fine But after I added it I can not open all links with https://
Has anyone come across this?

i am also facing the same issue. White screen on iframe . Although added sandbox allow properties and
in config.xml, but still no luck. Does anyone have any suggestions.?

@Singh-KiaTec
In config.xml under <platform name="ios"> add (NOTE this allows everything)
<access allows-arbitrary-loads-in-media="true" allows-arbitrary-loads-in-web-content="true" allows-local-networking="true" origin="*" />

Also, try running the iOS app in the simulator and open up Safari Web Inspector (Enable the Develop menu in Safari then go to Develop > Simulator > App - localhost) and check if you have any error messages...

Also, see #477

@developerjohan01
Thanks for the quick response. and the help. :)
Basically we have iframe loginpage and it does some user login stuff and navigates to a successapage and then sucesspage emits window.parent.postMessage and the app take those and continue the logic.

Now after loginpage it navigates to successapage within iframe and then sucesspage throws error Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Strange thing this happens only for IOS 13.1.x versions.

Tried the "<access allows-arbitrary-loads-in-media="true" allows-arbitrary-loads-in-web-content="true" allows-local-networking="true" origin="*" /> ", still no luck for IOS 13.1.x versions.

those are whitelist problems, you have to allow navigation to external iframes or they won't work, not related to the plugin

Was this page helpful?
0 / 5 - 0 ratings