How to load Rocket.Chat inside an iframe in WKWebView iOS

52 Views Asked by At

I'm testing how to load the Rocketchat site through an iframe. It loads fine in Android webview, but not in iOS wkwebview. When debugging, the error occurs at line 2. Is there a solution?
(*Even if you load the rocketchat channel directly into wkwebview, the same error occurs and it does not work.)

#ENV

iOS : 17.2
Rocketchat : 6.3.10
Nodejs : 14.21.3
MongoDB : 5.0.22

#Error Messages

*TypeError: Cannot call a class constructor without new
*There is no route for the path:"/channel/channelName/?layout=embedded"

#Error Screenshots

WebView Screenshot

Error screenshot

Error Detail 01

Error Detail 02

Steps to reproduce:

1.The domain on which rocketchat is running is abc.com

  1. The site where rocketcat will be inserted using an iframe is call.com.

  2. Use the iframe tag on the call.com web page to load the rocketchat website installed on abc.com.

*sample code:

4.Load the call.com webpage into iOS wkwebview.

When loading, an error occurs in 2 lines in console.log and no progress is made. It loads normally in browsers such as pc chrome, android chrome, android webview, and ios safari, but does not work properly only in ios WKWebView.

0

There are 0 best solutions below