I can not debug ionic app on macOS ventura. What has changed?

264 Views Asked by At

I used to debug my ionic Apps on ios simulators when i had xcode 13 however I can not debug after upgraded my macbook to MacOS Ventura. Now, I see "No ispectable devices" instead.

Simulator: Version 14.3 (994) SimulatorKit 629 CoreSimulator 885.2

I tried to debug my ionic app on ios simulator

1

There are 1 best solutions below

0
Niels van Rijn On

This is a new issue i've also had, we have to hope that Apple fixes it soon.

For now you can use this workaround

  • in your AppDelegate.swift
  • inside the func application
  • put:
#if DEBUG
      if #available(macOS 13.3, iOS 16.4, tvOS 16.4, *) {
            DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) {
                  if let vc = self.window?.rootViewController as? CAPBridgeViewController {
                        vc.bridge?.webView?.isInspectable = true;
                  }
            }
      }
#endif

For some reason when you delay the isInspectable you will be able to debug again! (it takes a wile to show up because of the delay)

https://github.com/ionic-team/capacitor/issues/6441#issuecomment-1491092025 https://forum.ionicframework.com/t/impossible-to-open-safari-web-inspector/232613