diff --git a/CHANGELOG.md b/CHANGELOG.md index f12c534..7b8ca24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Features + +- Enable WebKit inspector for debugging on iOS 16.4+ in DEBUG builds. + + ## 2.2.1 ### Fixes diff --git a/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift b/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift index a4323bd..e042092 100644 --- a/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift +++ b/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift @@ -74,6 +74,11 @@ class OSIABWebViewModel: NSObject, ObservableObject { self.webView.customUserAgent = customUserAgent self.webView.navigationDelegate = self self.webView.uiDelegate = self +#if DEBUG + if #available(iOS 16.4, *) { + self.webView.isInspectable = true + } +#endif self.setupBindings(uiModel.showURL, uiModel.showToolbar, uiModel.showNavigationButtons) }