Direct answer
Mostly no. A phone cannot be plugged into a Mac that is not next to you, so Xcode's wired device debugging is not available. The realistic approach is to run the logic in the simulator, then install the build on your own phone through TestFlight to verify it.
Basis
- For Xcode to install an app on an iPhone and attach the debugger, the device first has to be paired with that Mac. Pairing normally needs a cable connection and a tap on Trust on the phone, which a remote machine cannot do.
- Xcode supports connecting to a device over the network after pairing, but that is meant for a device and a Mac on the same network that can discover each other; see Apple's developer documentation for the exact conditions. A remote Mac and the phone in your hand are not on the same local network, so do not treat this as a workable option.
- The simulator runs normally on a remote Mac and suits checking layout, business flows and most system APIs. Hardware-dependent features such as the camera and some sensors are not covered by the simulator.
- TestFlight is the workable way to verify on a real device: archive and upload on the remote Mac, and once the build has finished processing, install it from the TestFlight app on your own phone. There are no breakpoints; you locate problems through logs and crash reports.
Boundaries: when the answer is different
If your app relies heavily on Bluetooth, NFC, the camera, push delivery or other features that have to be stepped through on a real device, a remote Mac cannot meet that need and you want a Mac within reach. Customers are not allowed to change the machine's network configuration, so please do not plan on altering the network to join your phone and the remote machine together.
How to do it
- Get the main flows working in the simulator on the remote Mac.
- Add enough logging in the code, or integrate crash collection, to make up for the lack of breakpoints.
- Archive and upload to App Store Connect, and add yourself as a TestFlight internal tester.
- Install the test build on your phone and check it along real usage paths.
- When you find a problem, change the code, raise the build number, upload again, and repeat the loop.
Related questions
- Is Xcode laggy on a remote Mac?
- Should I rent or buy a Mac just to build and publish an iOS app?
- How do I sign an iOS app and upload it to the App Store from a remote Mac?
- How do I publish an app to the App Store without a Mac?
Use case
This question belongs to the use case: iOS without a Mac: a remote Mac mini can build, sign and upload, but not debug on a real device
Other questions in the same use case:
- Is one month of Mac rental enough to publish a single app?
- Remote Mac vs GitHub Actions macOS runner or Codemagic: which should I use?
- What exactly do I receive when a rented remote Mac is delivered?
- Connection credentials are viewable once and I didn't save them. What now?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support