Post

Replies

Boosts

Views

Activity

Reply to iOS 16.4 webview can not debug in safari web inspector
Cordova team fix this bug with the release of Cordova platform iOS 6.3.0 (see Cordova blog post: https://cordova.apache.org/announcements/2023/04/15/cordova-ios-release-6.3.0.html) If you cant update your Cordova iOS platform for any reasons, you can update yourself the CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m file. Open your project in Xcode, go to the CDVWebViewEngine.m file, search for the lines: WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:self.engineWebView.frame configuration:configuration]; wkWebView.UIDelegate = self.uiDelegate; Then add following line and save. Re build your project and it should works (solution found here) WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:self.engineWebView.frame configuration:configuration]; wkWebView.UIDelegate = self.uiDelegate; if (@available(iOS 16.4, *)) { BOOL allowWebviewInspectionDefault = YES; wkWebView.inspectable = [settings cordovaBoolSettingForKey:@"InspectableWebview" defaultValue:allowWebviewInspectionDefault]; } I also recommend using Safari Technology Preview instead of Safari for debugging with web inspector. Good luck.
Apr ’23