美文网首页
WKWebView突然无法和真机联调。

WKWebView突然无法和真机联调。

作者: 白马青衫少年郎0 | 来源:发表于2023-06-12 15:46 被阅读0次

突然发现手机没法和WKWebView联调,手机设置检查了一遍都没问题,xCode,Safari也升级了还是不行。
最后发现iOS16.4有了一些改动。

/*!
@abstract Controls whether this @link WKWebView @/link is inspectable in Web Inspector.
@discussion The default value is NO.
*/
@property (nonatomic, getter=isInspectable) BOOL inspectable NS_SWIFT_NAME(isInspectable) API_AVAILABLE(macos(13.3), ios(16.4));
    webview.inspectable = YES;

设置一下就可以了。

相关文章

网友评论

      本文标题:WKWebView突然无法和真机联调。

      本文链接:https://www.haomeiwen.com/subject/oxrqydtx.html