From 549a810dfdf772ac1f38a518b0fd65cce3df5ecf Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Mon, 10 Jun 2024 11:14:45 -0500 Subject: [PATCH] make ios webview inspectable by safari in release --- ios/App/App/AppDelegate.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift index c3cd83b..74ecf46 100644 --- a/ios/App/App/AppDelegate.swift +++ b/ios/App/App/AppDelegate.swift @@ -8,6 +8,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + if #available(iOS 16.4, *) { + DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { + if let vc = self.window?.rootViewController as? CAPBridgeViewController { + vc.bridgedWebView?.isInspectable = true; + } + } + } + return true }