Simulate low network with Network Link Conditioner
We often work in high speed internet environments which is ideal for development, however this bliss might possibly, lead us to a critical factor, we as a developer tends to neglect or often miss about.
Yes I’m talking about “Network Conditions”
As a developer, we have to take care of users using all kind of internet connection’s bandwidth and latency. It is not always necessary that a feature working over Wi-fi connection will also gonna work on 3G network. Nevertheless it’s our responsibility to make it our & give users the most seamless u-experience.
But how we do so! Test our app in different network conditions?
The answer is “Network Link Conditioner”. Apple has provided us a developer tool which help us to simulate adverse network environments.
Let’s go step by step from installation ~ How to use it.
Installation
Pre installation we need to check our Xcode version, this will be required to install a compatible version of Network Link Conditioner.
Once you have your Xcode version ready,
- Navigate to Xcode -> Open Developer Tool -> Click on “More Developer Tools”.
2. You will be redirect to developer.apple.com, here you might have to login first if not already logged in.
3. Then look for Additional Tools for Xcode (For your compatible xcode version) and then download .dmg file.
4. Open the downloaded .dmg file, you will see various tool’s folder, we have to look for Hardware and open it.
5. Here you will have your “Network Link Conditioner”. Double tap and install it.
That’s it! Simple right?
We now have the tool installed and it can been seen in the System Preferences.
How to use it?
Unlock the tool in system preferences. Apple has made our life easier by providing presets profiles, varying from 3G to Wi-Fi.
You can select any of these or can create your required profile by navigating to “Manage Profile” option.
Now we run & test our app with NLC enabled.
Benefits:
- You will be able to find networking related bugs which you might have overlooked or never encountered.
- Many watch dog termination related crashes could also be analysed.
- Performance related to app freeze or scroll on views and many other could also be debugged.
Use this and let me know in the comments what effect of bandwidth you have found out in your workflows. Happy coding. 😊