views:

200

answers:

1

My app has to connect to a server, but sometimes when I test my application I don't have my server online, so the app remains stuck when opening. How I can test programmatically if the server is online? Is there something like ping so i can verify the state of the server and then doing the normal work or not if it is offline? Thank you!

+3  A: 

Take a look at Apple's Reachability example (you are encouraged to use it in your App Store-submitted apps).

Frank Schmitt