Ionic 5 Iframe is redirecting to login page on ios

I am using ionic 5. I need to open chat inside an iframe. I did the following code, that works fine on android but on ios, it is redirecting to login page. even the login did not work inside iFrame.

here is the code

iframe class= 'webPage' name= "chatPage" [src]= "url | safe"   frameborder="0"   (load)="dismissLoading()"   >  </iframe>

I tried inAppBrowser as well but that opens outside the app. so that can not be the solution. All suggestions are welcome.