Possible Duplicate:
How to check for an active Internet Connection on iPhone SDK?
I need to check the internet reachability before sending a request to fetch something remotely. I googles, and found several SO questions relating to this. But i need to check internet connectivity for iOS4 and iOS5. How can i do that programatically ?
2.) For example say i am downloading a big file (when there was internet). and suddenly the Internet goes down (Then the app might crash). So how can i avoid this ?