Monday, December 21, 2015

[Tip] Simulate various network conditions with "Network Link Conditioner"

Xcode provides a tool called Network Link Conditioner that can simulate various network conditions, including reduced bandwidth, high latency, DNS delays, packet loss, and so on. Before you ship any software that uses networking, you should install this tool, enable it, then run your software to see how it performs under real-world conditions.
Here are a few things to test:
  • Make sure your software remains usable even with lousy bandwidth. Tune your bandwidth consumption as much as you can.
  • Increase the latency to three or four seconds. Make sure that any user-initiated operation is delayed by only a few seconds, not by a few minutes.
  • When the network connection drops packets, your software should continue to function, just more slowly.

Enabling Network Link Conditioner on iOS device:

- Step 1: Open Settings -> Select Developer -> Select Status in group name (Network link conditioner):


- Step 2: Enable Network Link Conditioner -> Choose a profile of network (Wifi or 3G or 100% Loss,...).

Installation Network Link Conditioner on simulator:

- Step 1: Download "Hardware IO Tools for XCode" from Apple Developer Downloads. Select the appropriate release of the package.
- Step 2: Open "Hardware_IO_Tools_for_Xcode_xxx.dmg" and double-click "Network Link Conditioner.prefPane" to install:
- Step 3: Once the installation has finished. You open System Preferences and see as below:
- Step 4: From now on, you can enable Network Link Conditioner from its. 
- Optional: You can manage these profiles by click on "Manage Profiles" and open the dialog as below:


Enjoyable "Network Link Conditioner" with your application.

Reference documents:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.