Check For Internet Connectivity In Xcode : I am using Swift 3 and xCode 8. All the other scripts and stuff online to do this all raise a lot of errors. How would I in a simple way make the app check for an internet connection when it was launched and if it had one to continue and if it doesn't have a connection to show the user a popup saying so?

I am open to any suggestion. Thank you!