Product design is about empathy. Knowing what a user wants, what they like, what they dislike, what causes them frustration, and learning to understand and embody those motivations — this is what it takes to make something insanely great.
And so we invest in reaching beyond our own operational model of the world. We tailor our experience to different locales. We consider the usability implications of screen readers or other assistive technologies. We continuously evaluate our implementation against these expectations.
There is, however, one critical factor that app developers often miss: network condition, or more specifically, the latency and bandwidth of an Internet connection.
For something so essential to user experience, it’s unfortunate that most developers take an ad-hoc approach to field-testing their apps under different conditions (if at all).
This week on NSHipster, we’ll be talking about the Network Link Conditioner, a utility that allows macOS and iOS devices to accurately and consistently simulate adverse networking environments.
Network Link Conditioner can be found in the “Additional Tools for Xcode” package. You can download this from the Downloads for Apple Developers page.
Search for “Additional Tools” and select the appropriate release of the package.
Once the download has finished, open the DMG, navigate to the “Hardware” directory, and double-click “Network Link Condition.prefPane”.
Click on the Network Link Conditioner preference pane at the bottom of System Preferences.
You can choose from one of the following presets:
- 100% Loss
- High Latency DNS
- Very Bad Network
- WiFi 802.11ac
…or create your own according to your particular requirements.
Now try running your app with the Network Link Conditioner enabled:
How does network latency affect your app startup?
What effect does bandwidth have on table view scroll performance?
Does your app work at all with 100% packet loss?
Enabling Network Link Conditioner on iOS Devices
Although the preference pane works well for developing on the simulator, it’s also important to test on a real device. Fortunately, the Network Link Conditioner is available for iOS as well.
To use the Network Link Conditioner on iOS, set up your device for development:
- Connect your iOS device to your Mac
- In Xcode, navigate to Window > Organizer
- Select your device in the sidebar
- Click “Use for Development”
Now you’ll have access to the Developer section of the Settings app. You can enable and configure the Network Link Conditioner on your iOS device under Settings > Developer > Networking. (Just remember to turn it off after you’re done testing!).