views:

279

answers:

2

Hi

I have been looking for the answer to this question for some time. I am doing network programming for the iPhone and it is necessary for me to use the IP address of the device. This isn't a problem on the physical device as it has its own IP address on the network. However I was wondering what was the case with it on the simulator. Does it get assigned an IP address to be used?

Thanks in advanced for any help,

CG

+3  A: 

The ip address of the machine you are running it on

sylvanaar
The iPhone simulator doesn't have its own network interface. All the network API's simply route network calls through to the system's network API. This is one of the main reasons why testing network related code shouldn't be done on the simulator.
Jasarien
Ah ok. Thanks for that. That could make this a bit more difficult to test unfortunately :(
Chris G
A: 

should be 127.0.0.1