Network Link Conditioner

Network Link Conditioner

In this post we will discuss how you can simulate a bad network connection by using the Network Link Conditioner.

Bad Network Connection

iOS apps are running in a very difficult environment. Compared to a desktop computer you have limited memory and CPU resources. And even worse: The network connection is very inconsistent. We are using our apps not only at home but also on the train, while running and in the cafe. Many mobile apps depend on an internet connection, so that is very crucial that you are providing a good user experience even if the network connection is bad.

But on the other hand we normally have always a very good internet connection while developing apps. So you should not only test a bad network connection in the field, but also directly at development time. Fortunately that’s not a problem at all – you can simulate it with the network link conditioner, both on the simulator and on the iOS device.

Network Link Conditioner on the iOS simulator

To use the network link conditioner on the iOS simulator you have to install it on your Mac. For that you have to go to the Downloads for Apple Developers website and search for “hardware io tools for Xcode”. Then choose the newest one and after downloading and opening the .dmg file, you can choose “Network Link Conditioner.prefPane”. Now the Network Link conditioner is available as a new item on your system preferences panel:

Network Link Conditioner

After opening it you can choose between several profiles. In addition, you can also create your own profiles:

Network Link Conditioner

If you activate it, all the network traffic on your Mac is affected – not only the one in the simulator! So don’t forget to switch it off after you are done.

Network Link Conditioner on an iOS device

When you are developing iOS apps, you should not only test on the simulator but also on a real device. Fortunately, you can use the Network Link Conditioner also on iOS devices. It is available as long as the development mode is enabled on your iOS device.

You can find the network link conditioner at “Settings” -> “Developer” -> “Network Link Conditioner – Status”:

Network Link Conditioner

Again, you can choose between existing profiles and you can create new profiles.

Conclusion

The network link conditioner is a great tool to test your iOS app under various network conditions.

References

Image: @ Yabresse / shutterstock.com

Book Tip

Big Nerd Range Guide: iOS Programming: Excellent introduction to iOS development. Some programming experience is recommended.

Amazon