After iOS 16.4, real devices and simulators cannot use Safari to debug H5 pages.

background

When debugging H5 on a real device after iOS 16.4, I found that the page cannot be debugged under the development module in Safari.
Insert image description here

solution

Set the following code in WKWebView to solve the problem

if (@available(iOS 16.4, *)) {
    
    
        [_webView setInspectable:YES];
    }

Then just debug again
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_36162680/article/details/134273457