0

My app is coming together now. It's purpose is to search the internet and return JSON data. I realised the importance in catching exceptions such as when there's no internet connection. Now my app will show an alertview explaining that there's no internet connection available - this happens when the NSData returned is nil (because of the lack of internet) so how would I go about catching the exception itself?

Mo Moosa
  • 917
  • 1
  • 19
  • 38

1 Answers1

0

You're not looking for an exception, you're just looking for the reachability of the network. This post has great info:

How to check for an active Internet connection on iOS or OSX?

Community
  • 1
  • 1
pho0
  • 1,751
  • 16
  • 23