iOS wireless debugging

New Mac, who dis?

Treated myself to a new iMac to complement my little Air, but I can’t get Xojo to recognise my iPhone wirelessly to allow wireless debugging. It works fine when plugged in via USB, but the menu under Project > Run On never shows the phone in WiFi mode. I can wirelessly run from Xcode. Rebooted, refreshed menu etc etc.

Any ideas?

@Gavin_Smith Sorry to resurrect and old thread, but did you ever figure this out? I’m in a situation where I can see my iPhone both via USB and Wi-Fi, but my iPad I can only see via USB.

What’s odd is that Xcode sees my iPad on Wi-Fi just fine and can connect. I’ve jumped through all the various hoops from ensuring “Connects via Network when wired connection is not available” is set in Devices and Simulators in Xcode, Show Run Destination being set to Always, unpairing, turning off developer mode and then starting from scratch but no luck.

Or maybe someone knows if there’s a ticket opened on this. I vaguely remember something, either a ticket or something in the forum that I had replied to where someone was having similar problems and I had mentioned that I had only ever gotten USB connections to work on my iPad.

Nope, and I forgot about it until your post, as I’ve gotten so used to just using a cable each time. I tried it again there now, and I get the same results as you - works fine in Xcode, but in Xojo it’s only visible via USB. I don’t see a ticket so I created one - https://tracker.xojo.com/xojoinc/xojo/-/issues/77399

Just to be clear, the following things need to happen for iOS devices to appear for debugging over WiFi:

  • Developer mode needs to be turned on for the device (Privacy & Security > Developer Mode) and the device must have been restarted at least once since it was turned on.
  • In Xcode’s Devices & Simulators window, Connects via Network needs to be checked
  • The device needs to be on the same WiFi network as your Mac
  • If macOS asks to let Xojo find devices on local networks network, you must click “Allow”.

@Gavin_Smith Thanks for confirming and creating a ticket. I just put my own details in there including screenshots. :crossed_fingers: one of the Xojo devs can get to the bottom of this.

@Greg_O Thanks for the additional insights. I can confirm yes to all of your bullets and I put more details in the ticket. No expectations for you to pursue any of this as I know you’re a former dev @ Xojo and this isn’t your role anymore. I appreciate you chiming in though.

I too have intermittent failures in this area. One thing I can tell you is that I was having way more problems with this in macOS 15 than I am in 15.1b4, but it seems to take a while for the WiFi debugging to show up once the device comes within range of your Mac.

Make sure Bluetooth is on for both devices too. If they’re using their Multipeer capabilities, that might be required too

More good callouts Greg! Bluetooth is on for both and I’m still on macOS 14.7 but I recall this being a long time issue (years plus) so I would have also seen this under macOS 13 as well as iOS 16. Good to hear that maybe macOS 15.1 might improve things.

What do you mean by multipeer? Is there something in Bluetooth that I need to enable/disable?

Apple has a framework called MultiPeer Connectivity which is for letting nearby iOS and macOS devices talk to one another over Bluetooth, WiFi and/or Ethernet. I suspect that Xcode uses that for device discovery, but also know that Xojo does not. They use a console app called ios-deploy because it also gives them the ability to transfer binaries to the devices as well.

For what it’s worth, when this feature was designed, it was my intention that tethered and non-tethered debugging be possible… and it did work at that time. This could just be something that Apple changed which broke xojos process.

1 Like

Thanks for the clarification Greg. I now get what you mean by multipeer. Essentially if Xojo is using Apple’s Multipeer Connectivity framework behind the scenes, then having Bluetooth on might be required.

Your lead on ios-deploy was super helpful as I was able to capture more data on the situation for the ticket. My iPad is coming up with a lot of missing data (e.g. friendly model name, OS name, architecture & build) that maybe this could be the root cause. Add in the fact that I’ve had this problem for years, regardless of my physical iPad unit, that the thought has crossed my mind that maybe this is an issue where ios-deploy hadn’t gotten updated when iPadOS came about. Of course sort of assuming there were changes there different from iOS.

Maybe an entirely different issue though and it doesn’t explain the scenario Gavin is in where it’s his iPhone that has problems with Wi-Fi.

What I can tell you is that I can get both my phone and my gen 9 ipad to debug over WiFi so there may still be something missing on your system.

1 Like

@Patrick_Salo - What model is your iPad?

It’s the prior generation, “11-Inch iPad Pro (4th Generation) M2 chip Wi-Fi + Cellular.” The identifier is “iPad14,4”, the non-friendly model number is A2435 with the Apple SKU of MP573LL/A.

Although it has cellular it’s deactivated and I’ve seen no difference in Xojo or even Xcode whether cellular is turned on or off.

Here’s an interesting turn of events… I can’t debug to my iPad over USB today…

Wowsers, this is quite a bug!

Coincidentally, I just plugged in both my iPhone and iPad and I’m now only seeing the following two options which is really odd…

  1. Patrick’s iPad - - 17.7 (USB)
  2. Patrick’s iPhone - iPhone 12 Pro Max - 17.7 (WIFI)

So in my case my iPhone is missing the USB option and of course to the root of this thread/discussion, my iPad is missing the Wi-Fi option.

I’m happy I still have at least a single path forward for each device and :crossed_fingers: that things don’t get worse.