There are many reasons you need to check if the user is connected to the internet within your app, most important is that your app needs to retrieve data from a feed or display a web view. As soon as your app is loaded and before you make any calls to get data from a feed you should check if the user is connected to the internet.

In the past in Objective-C the most common way to check for connectivity is using Reachability, but it hasn’t been converted to Swift as of yet. Below is a simple way to add this feature to your new Swift project.