Using Safari Web Inspector on a WebKit based app stopped working on iOS 16.4
.
This was properly working before.
More specifically, using the iOS Simulator or a real device, debugging a WebKit based app and from Safari on macOS accessing the Develop to inspect the app.
No difference at all if it is the Simulator or a real device; none seem to work, but inspecting iOS-Safari from macOS-Safari works as expected.
I already tried deleting and reinstalling the app, erasing the simulator, etc.
2
Answers
There is a new property isInspectable on
WKWebView
,false
by default but turning it on will enable the inspector.This works both for iOS and macOS, no need for the old way of using KVO on macOS with
developerExtrasEnabled
anymore.Available
16.4
13.3
Turning it on
If you don’t want to update your macOS or xcode try this
This worked for me on
XCode -> 14.2 (14C18)
macOS -> 13.4 (22F66)
Ref -> https://stackoverflow.com/a/76603043/12150745