Skip to content

Commit c2d6c20

Browse files
committed
allow debugging locally
1 parent 57c386a commit c2d6c20

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ios/App/App/AppDelegate.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
88

99
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1010
// Override point for customization after application launch.
11+
// When running from Xcode in debug mode, enable webView inspection 5 seconds after startup
12+
#if DEBUG
13+
if #available(macOS 13.3, iOS 16.4, tvOS 16.4, *) {
14+
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) {
15+
if let vc = self.window?.rootViewController as? CAPBridgeViewController {
16+
vc.bridge?.webView?.isInspectable = true;
17+
}
18+
}
19+
}
20+
#endif
1121
return true
1222
}
1323

0 commit comments

Comments
 (0)