Debug with Xcode while connecting a usb device to iPad or iPhone

I'm developing an app that connects and uses a USB device. Is there a way to build and debug in Xcode with a USB device connected to an iPad or iPhone? I tried connecting a USB hub to ipad, but Xcode didn't recognize it.

Using Devices PC:mac mini M1 Soft:Xcode ipad:ipad air(5th) USB Device:MOTU M4(Audio Interface)

Replies

Build and debug the app via wifi. Do not connect the iPad or iPhone to your Mac, plug it into the MOTU only.

Thank you very much! it was very helpful!

Post not yet marked as solved Up vote reply of K-K Down vote reply of K-K