I can debug WKwebview's js content with Safari inspector when I run the project into a real device, but Safari can't find any inspectable appliction when I try to debug the archived app that has been set to be debug. By the Way, I have set the deivce's Web inspector enable.
How to debug WKWebView for iOS application that has been archived and set to be debug in a real device?
Debug WKWebview is not possible until run the application from Xcode, even for archive with debug (build configuration ) won't help.
refer below link https://blog.vuplex.com/debugging-webviews
I am now fixing the old react native app, and I found that even when I run it by Xcode, the safari does not show anything at the develop menu, however it is ok before, I guess maybe the bug from ios 17 ?
I do not know the real reason, a little stuck at this point
To enable the web inspector for WKWebView with iOS 16.4+ you need:
- Device - Settings - Safari - Advanced - Enable Web Inspector
- In code enable flag
webView.isInspectable = true
for WKWebView