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)

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!

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