Updates:
problem solved, just a careless mistake.
Hi, I am facing some trouble in using iFrame on IOS.
I tested with both browser and android, they have no problem loading the iFrame at all.
However for IOS, the iframe is always blank.
Do anyone have encounter such problem before, and know any way to solve this?
Or is it a bug?
Way to reproduce:
-
create a brand new project.
-
include this in home html:
<iframe class="iframeStyle" [src]="safeURL"></iframe>
- load the url with DomSanitizer in home.ts file:
//in constructor, using ionicframework.com as example
urlToLoad : string = "https://ionicframework.com";
this.safeURL = sanitizer.bypassSecurityTrustResourceUrl(this.urlToLoad);
- In config.xml, make sure to include some settings to solve some CORS and navigation issue
<access origin="*" />
<allow-navigation href="*" />
- serve, build and run on browser, android and ios.
Serve and android will successfully display iFrame, but IOS will always be blank.
Feel free to use Safari Web-Insepctor to inspect the IOS App.