通过USB连接iPhone上的Parallels呼叫网络服务(Call web service running on Parallels from iPhone connected via USB)

我可以请求一个运行在IIS上的Web服务。

http://windows:57239/api/hello

在iPhone模拟器中工作正常,但在XCode中调试时,不能通过USB连接iPhone设备。

是否有可能做到这一点? 我想通过应用内购买来调试我的API。

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.

最满意答案

我将我的Parallels实例切换到桥接网络模式,并让Wifi的DHCP分配一个IP地址给它。 然后我使用iPhone应用程序的这个IP地址。

不完全令人满意,因为IP会有所不同,但是它非常酷,iPhone在虚拟Windows实例上运行的Visual Studio中触发了一个断点。

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.

更多推荐