user3249524
user3249524

Reputation: 71

iOS: What is the best way to test internet connection through out the app?

I need to test internet connection if it is availiable. Only problem is I want to test it through out the app, so no matter what viewcontroller I am on if I lose connection I can tell. I already have a way to test connection, just need a way to do it throughout the app.

Upvotes: 0

Views: 68

Answers (1)

MCKapur
MCKapur

Reputation: 9157

Reachability is a good open source little tool for monitoring an iOS device's network state, it can provide notifications when the network state changes too. You could use Reachability in your app delegate or a global singleton for eg. - so it's accessible from everywhere in your app.

Upvotes: 2

Related Questions