Is there a way to simply programmatically view console logs generated inside of a WKWebView on both Android and iOS? I cannot find a reliable solution for this and need it for production logging. I am currently running a web app that I do not own in the WKWebView, so I cannot modify any of the web content.
https stackoverflow com a 50755886
This is the only viable solution I have found so far, but it requires overwriting the console log functionality in JS. This "theoretically" should work, but is definitely not the most ideal solution given that I do not own the JS source code I am running within the WKWebView.
Answers
WKWebView
is a webkit control of iOS and we can only consume it on the iOS platform.https://stackoverflow.com/a/50755886/8354952
This thread has explained how to implement it on WKWebView. If you want a translation for Xamarin here it is:
And WebView on Android can print the log information directly.