During a former project, my client asked me to make sure their app could upload photos even with poor data connection on the user's device. I didn't want to lose time looking for a location with slow network to test it, so I found some ways to simulate poor signal conditions at all stages of the development.
You want to test your features in poor network conditions as soon as you develop them, so you need tools simulating a slow mobile connection on your device emulator on your local machine. Thankfully, the React Native debugger already provide an option for that.
You have deployed your feature and you want your stakeholders to give you feedback about how it feels on a slow network. What can you do since they don't have access to dev tools?
Tell them to go to the far countryside where you don't even have 3G.
Just kidding ! There is a way depending on the OS of your device.
To simulate poor network conditions on an iPhone or iPad, you need access to the Developer settings. However, you need a Mac and XCode to do that.
Now you have access to the Developer settings, select "Network Link Conditioner" to access the tool.
No need for developer settings on an Android device: go to Parameters > Wi-Fi and Internet > Mobile network > Preferred network type. You can then select if you want to enable 4G, 3G or only 2G.
This method has two drawbacks:
Note that it allows you to generate hotspots with 2G/3G speed, so you can connect an iOS device without Developer settings to an Android hotspot.
++table style="border-collapse: collapse; width: 100%; border-width: 0px; border-style: solid;">++tbody>++tr>++td style="width: 33.3333%;">++/td>++td style="width: 33.3333%;">
++/td>++td style="width: 33.3333%;">++/td>++/tr>++/tbody>++/table>
Now you know how to simulate poor network conditions on your devices as well as your local machine and you are ready to test all your features! Expect to add a couple loaders or progress bars to avoid frustration among the users of your app :)
If you know any other way to simulate a poor network on other mobile devices, feel free to let me know by sending me a tweet!