Search code examples
iphonexcodemacosnetworkingparallels

Call web service running on Parallels from iPhone connected via USB


I can request a web service running on IIS Express/Parallels from Mac OS with...

http://windows:57239/api/hello

This works fine from the iPhone simulator, but not from an iPhone device connected via USB, when debugging in XCode.

Is it possible to make this work? I would like to debug my API with in-app purchases.


Solution

  • I switched my Parallels instance to Bridged networking mode and let the Wifi's DHCP assign an IP address to it. Then I used this IP address from the iPhone app.

    Not entirely satisfying because the IP will vary, but its very cool having an iPhone trigger a break point in Visual Studio running on a virtual instance of Windows.