0

I want an app to be done in IOS. The app has to give a notification to the user when the network is lost. Is it possible to check the network status using Objective C? is it a lot of work?

I am new to ios development and the person who is coding says this will take a few hours to write.

Also i want a vcard sharing script for ios. the developer says it will take 5 days to complete the task.

can any one help me on this? Am tired of hearing many excuses from his side and unable to proceed further.

thank you

chuplu
  • 164
  • 1
  • 14
  • https://www.google.co.in/search?q=reachability+notification+ios&oq=reachibility+noti&aqs=chrome.2.69i57j0l5.9983j0j1&sourceid=chrome&es_sm=119&ie=UTF-8 – iphonic Feb 18 '15 at 05:02
  • Duplicate: http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk – gotnull Feb 18 '15 at 05:10

1 Answers1

1
 If you want to check reachability before some code execution you should just use..You can use reachability class for checking network status..



   Reachability *reachability = [Reachability reachabilityForInternetConnection];    
   NetworkStatus internetStatus = [reachability currentReachabilityStatus];
    if (internetStatus != NotReachable) {
     //my web-dependent code
     }
     else {
      //there-is-no-connection warning
     }

  You can also add a reachability observer somewhere (i.e. in viewDidLoad):

   Reachability *reachabilityInfo;
   [[NSNotificationCenter defaultCenter] addObserver:self
                                     selector:@selector(myReachabilityDidChangedMethod)
                                         name:kReachabilityChangedNotification
                                       object:reachabilityInfo];