- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to disable the network in iOS Simulator?
Sometimes while testing our app on simulator we need to test for case where no internet is available. This can be achieved in multiple ways.
Below are some of the possible ways to do it
Easiest but not the most correct way is to disconnect your mac from the LAN Cable is you are on a LAN, or turn off the wifi if you are connected on a wifi network. But that will definitely turn off internet for your whole device, not just simulator. So, there are some more ways to do it
Download Hardware IO tools for Xcode.
Go to Xcode menu, select open Developer tool
Select More Developer tools from that menu
This takes you to apple developer account, sign in to your account, Now if you still have Xcode older than 8.0 you need to download Hardware IO tools for xcode, other wise for new Xcode search for Additional tools for Xcode
Download and install this tool, then open system preferences in you mac.
You’ll find the tool Network link conditioner installed there, for newer xcode versions you may find it in Xcode developer tools menu.
Use it to control the network.
This tool will also effect speed of your mac at the same time along with the simulator.
- How to take a screenshot of my iOS application in the iOS simulator?
- Where are iOS simulator screenshots stored?
- How to use images while developing iOS App in a Simulator?
- Disable Orientation Change in iOS
- How to enable/disable data connection in iOS programmatically?
- Disable Scroll View Programmatically in iOS?
- How to disable the keyboard shortcuts in Matplotlib?
- How to disable only the horizontal scrollbar in Java?
- How to enable/disable the GPS programmatically in Android?
- How to disable ONLY_FULL_GROUP_BY in MySQL?
- How to disable Bluetooth in android?
- How to disable wifi in android?
- How to disable the credssp authentication using PowerShell?