This is an automated email from the ASF dual-hosted git repository. jcesarmobile pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git
The following commit(s) were added to refs/heads/master by this push: new ec16fee feat(ios): Make WebView inspectable (#1015) ec16fee is described below commit ec16fee79fa7bf3c172bd5bf095f8ca109189c62 Author: jcesarmobile <jcesarmob...@gmail.com> AuthorDate: Mon Sep 11 14:20:53 2023 +0200 feat(ios): Make WebView inspectable (#1015) --- src/ios/CDVWKInAppBrowser.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m index 2adcf0c..5cf8e15 100644 --- a/src/ios/CDVWKInAppBrowser.m +++ b/src/ios/CDVWKInAppBrowser.m @@ -18,6 +18,7 @@ */ #import "CDVWKInAppBrowser.h" +#import <Cordova/NSDictionary+CordovaPreferences.h> #if __has_include(<Cordova/CDVWebViewProcessPoolFactory.h>) // Cordova-iOS >=6 #import <Cordova/CDVWebViewProcessPoolFactory.h> @@ -774,6 +775,21 @@ BOOL isExiting = FALSE; self.webView = [[WKWebView alloc] initWithFrame:webViewBounds configuration:configuration]; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160400 + // With the introduction of iOS 16.4 the webview is no longer inspectable by default. + // We'll honor that change for release builds, but will still allow inspection on debug builds by default. + // We also introduce an override option, so consumers can influence this decision in their own build. + if (@available(iOS 16.4, *)) { +#ifdef DEBUG + BOOL allowWebviewInspectionDefault = YES; +#else + BOOL allowWebviewInspectionDefault = NO; +#endif + self.webView.inspectable = [_settings cordovaBoolSettingForKey:@"InspectableWebview" defaultValue:allowWebviewInspectionDefault]; + } +#endif + [self.view addSubview:self.webView]; [self.view sendSubviewToBack:self.webView]; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org