Testing iOS Apps for Tough Network Conditions

Testing iOS Apps

If you are writing an app for smartphones, its performance depends as much as anything on the condition of the network behind it. But, do you test for adverse network conditions? No, then you should start now.

Some time ago I found a very cool article about Network Link Conditioner written by Mattt Thompson. This paragraph, in particular, got my attention,

There is, though, one critical factor that app developers often miss the first time around, and that is network condition, or more specifically the latency and bandwidth of an Internet connection. For something so essential to a user’s experience with a product, it’s unfortunate that most developers take an ad-hoc approach to field testing different kinds of environments, if at all.

Honestly, I was one of those developer that often miss the importance of test the app on adverse networks conditions. I know, shame on me.

The Problem

I was “forced” to look for a tool that could help me to simulate adverse networking environments when the app I was working on started to freeze under “strange” circumstances!

I spent a lot of time trying to figure out what could be the issue. Then, I realized that it could be because of a bad internet connection. So, I took my iPhone and walked around the office until I got to a spot with a faint wireless signal and, BAM, the app froze on me.

The Solution

The first tool that I found was speedLimit it is very straight forward. You can limit your network bandwidth to one of the following configurations,

  • DSL
  • Edge
  • 3G
  • Dialup

Also, it can be configured to only affect the request to the hosts in a list.

I finally found the problem with my app by using this tool. I was using Reachability. That is not a bad thing, but I was calling the method as part of a synchronous call and the app hung waiting for a response from the server.

Yes, I know: a synchronous call as part of the main thread, who does that?

In my defense, I was just starting developing on iOS. The thing is that you lean more from your mistakes than from your victories.

The Recommendation

Since Lion OS, I started to use the Xcode tool Network Link Conditioner instead of SpeedLimit. Network Link Conditioner has a few cool features. For instance, you can install that tool on a real device and do your testing there. SpeedLimit is limited to the iPhone simulator.

So please, take at look to Network Link Conditioner. Give this tool a try and you will see how useful it can be.

Focus Mode

Contact Request


We will call you right away. All information is kept private