Ionic v5: iFrame does not load on iOS

I am using an Ionic v5 App on iOS: I use an iFrame from the external service of the “Deutsche Bahn”: https://www.bahn.de/p/view/home/partnerprogramm/anreiseservice.shtml

<iframe src="https://dbaw.specials-bahn.de/149cff8c-5fbd-11ea-8079-00163efd4d20.html" 
        width="100%" 
        height="346" 
        name="iFrame"> 
</iframe>

I specified

<allow-navigation href="*" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

in config.xml, but it is still not possible to open the link of the external iFrame.

Whats the solution for this?

1 Like

Die gute alte Deutsche Bahn :joy:

  • Does it work on Android?

Yes. It works very well on Android…

What is the error you are seeing? What do the dev tools tell you? Please inspect them first and provide the error message

We’re getting a similar issue in iOS and have no problem loading the iframe content in Android builds. The Safari dev tools report 403 when attempting to load the iframe src. We are using Gigya’s WebSDK RaaS which dynamically creates iframes to load their login / auth experience. We’re tried Gigya’s Cordova plugin but I believe we have to create an ionic-native wrapper around it (https://github.com/ionic-team/ionic-native/blob/3e0b0750d851fab8e6af189c8f4aafa091402f4e/DEVELOPER.md)… so we’re hoping to get their WebSDK RaaS working with iOS to get our POC moving along.

Thankfully we can get what we need by directly using Gigya’s REST API. There’s no swagger, but it is documented, so much more lightweight to use and to drop a music adage, “less is more.”