In my ionic application
Component.html
<ion-content>
<iframe #iframe height="100%" width="100%" title="test"></iframe>
</ion-content>
Component.ts
@ViewChild('iframe') iframe: ElementRef;
this.iframe.nativeElement.setAttribute('src', this.gameUrl);
is succeesfully working but my gameUrl site is a core HTML site so when I navigate to second page of my game site by
window.location.replace(`https://<gamesh5app>/start.html?id=${userId}&gamePlay=${gamePlay}`);
It just close the iframe and window.onmessage method of my ionic application get called
and I am getting error message
Blocked a frame with origin "https://gamesh5app" from accessing a frame with origin "https://exmaple.co". Protocols, domains, and ports must match.
Error only getting into IOS as into android it is working fine.
Please help.