Reputation: 3136
I am working on an App which needs to be tested in both Online/Offline Mode so I want to know whether there is any way to turn On/Off the Internet Connection of the iPad Simulator(without turning OFF my MAC's Internet Service). Please Help
Upvotes: 7
Views: 15465
Reputation: 124997
The only way to completely disable the simulator's network access is to unplug your Mac's network connection (or turn Wi-Fi off), because the simulator is just a process running on your Mac.
Most often, though, it's enough to block access to certain resources, e.g. whatever Internet services your app uses. A proxy server such as Charles or Proxyman will let you do that, so you can test situations where your app can't access your server. Proxy servers are also invaluable for debugging network problems, simulating specific server responses, etc.
Upvotes: 1
Reputation: 8947
no, simulator uses the same connection as your mac does. so you can't mannually turn it off for simulator
Upvotes: 4