Is it possible to disable the network in iOS Simulator?

后端 未结 20 1360
名媛妹妹
名媛妹妹 2020-11-30 15:58

I am trying to debug some inconsistent behaviour I am seeing in an application that gets its primary data from the internet. I don\'t see the issues in the simulator, just

20条回答
  •  不知归路
    2020-11-30 16:34

    A simple solution is to create an Airplane Mode for your Mac. Here is how to do this:

    • go into Network in System Preferences
    • click on Location dropdown menu
    • click on plus icon to add a new location
    • name the new location 'Airplane Mode' or similar, and click 'Done'
    • select the location you just created from the Location dropdown menu
    • click on each available network interface in the list at the left of the window in turn, disabling each one
    • click on the Configure iPv4 menu, and choose Off
    • for Wi-Fi, just click on the Turn Wi-Fi Off button
    • click Apply, and this location will block all network activity

    When you want to turn networking back on, just select Automatic from the Location dropdown menu, and click Apply

    • credit for this solution: http://hints.macworld.com/article.php?story=20130325002258846

提交回复
热议问题