You can build and run an iOS app on a real iPhone plugged into a Windows PC, using a Mac that sits somewhere else. We tested it end to end: the iPhone stayed on a Windows laptop, Xcode ran on a remote Mac opened in the browser, and an app with the HomeKit capability was signed, installed and launched on the phone.
The question came from a developer without a Mac. His iPhone is connected to his Windows PC by USB, and he needs Xcode to build an app that uses HomeKit. Simulators were not enough: he has real accessories paired with the app. So we tried his exact workflow on one of our Macs before answering.
What we used
Part What it was
PC Windows 10 (22H2) laptop
Phone iPhone 16 Pro Max, connected to the PC by USB
Mac MacBook Air M1 8 GB, opened in the browser through a JustMac session
IDE Xcode with the iOS platform installed
USB over network, option A FlexiHub (paid, cloud relay, 5 free demo sessions)
USB over network, option B USB Network Gate free version + Tailscale
Apple Account A developer…