iOS Dev Nugget 219 Test Your App with Airplane Mode enabled


Need to run a code review on your codebase? Hire me

In #13 and #67, I mentioned using Link Conditioner on macOS and iOS respectively to simulate a slower network for testing your app. Here's an extension of that:

Test your app with Airplane Mode enabled!

Depending on your priorities, this can mean getting the app to work almost perfectly in offline mode — i.e. caching enough data so that you can fulfill most of user needs (e.g. maps apps or document viewer apps) and persisting user operations that require connectivity (such as posting a tweet) so they can be "played back" when there's connectivity — to something similar like displaying an alert to the user notifying that the app needs connectivity to work.

At the very least, you should check that the app doesn't break without connectivity, e.g. overriding your app's local cache with empty or "nil" data because of failed network requests.

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No



Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter


View archives of past issues