0

I have app that needs to load data from xml list. I would like to know how to:

  1. If there is no internet connection how to close app (with message: for example "Unable to load your data, Please connect to the internet and try again")

My challenge is to close app when there is no internet. I can not use Exit(x) right? But, what other options I have, Any advice is really appreciated.

Thanks in advance

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

1 Answers1

0

First of all you need check if exist internet connection. For help you can run next example: http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html For exit from app you can read next post: How to close an application programmatically when the user taps on a button

Community
  • 1
  • 1
stosha
  • 2,108
  • 2
  • 27
  • 29
  • Thanks I read this before and didn't help me. First I have procedure to check if internet connection exist. But what after that. I found one app that does that. When you start app, app will check if internet connection exist or not. If does exist it will load list of rss from xml file but if internet connection doesn't exist it will show message and will minimized. I would like to have the same logic in my app. Any ideas? – user1739539 Jun 13 '13 at 19:33