I think I'm having the same issue using an iPad mini 4. I can run and debug via lightening cable but can not connect via network. When I try to select "Connect via network" Xcode reports "Please check the device connection and ensure that a passcode is set on the device." The iPad is connected to the same network and a passcode is set.