5

I have been working on my appliance years now, and as always using the Safari's Web Inspector. But today my Mac's Safari Inspector won't show/see anymore my App's webview, anyone have a clue about what could it be?

MacOS: 13.3.1 Processor: M1 Pro iOS: 16.4.1 App Target Minimum iOS Version: 13.0

P.S.: the MacOS safari is still able to inspect my iPhone safari, but anymore on my app.

2 Answers2

10

After reading some articles, I found out that Apple created one attribute on the WebView protocol, so from the iOS 16.4 or newer, you need to make the web inspection available like this:

Swift

if #available(macOS 13.3, iOS 16.4, tvOS 16.4, *) {
    webView.isInspectable = true
}

Objective-C

if (@available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
    _webView.inspectable = YES;
}
0

Here's more info

Also if you use Cordova
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)

starball
  • 20,030
  • 7
  • 43
  • 238
Johny
  • 1
  • As this answer only contains additional information to the accepted answer, this answer should have been added as a comment to the accepted answer. – MKorsch Jun 23 '23 at 11:36