On the iPhone simulator, WiFi is always on, and I can't test the internet connection with the Reachability functions.
If I use NSURLConnection
and contact, for example, Google, I wi
Asked
Active
Viewed 7,698 times
0
-
Possible duplicate of http://stackoverflow.com/questions/6001253/wifi-on-iphone-simulator – Max MacLeod May 14 '11 at 11:47
-
1Close. What is being asked here? – Martin Wickman May 14 '11 at 17:05
-
1Unless that sentence gets completed, I'd say this isn't a real question. If it does, this may be a dupe. xars, please update the question. – jscs May 14 '11 at 17:13
-
Check out http://stackoverflow.com/questions/1614802/simulate-airplane-mode-in-iphone-simulator – pfrank Aug 29 '13 at 22:48
1 Answers
5
Not sure exactly what your question is, but if it's how to turn simulate having no network on the simulator then here is the answer:
The simulator just uses your default Mac network connection so do what you need to do to disconnect your mac from the network and the simulator will experience the same loss of network connectivity.
For me, I use WiFi on my mac so when I want to test the Reachability class then I just us the "Turn Airport off" option on my mac.

Damien
- 2,421
- 22
- 38