1

I am working on a project is related to Watch/iPhone and my phone pair with watch. my watch application working well then my mobile device wifi and bluetooth connection 'ON' getting status connected.

I am doing wifi and bluetooth connection 'OFF' on my mobile device. my watch application 2 to 3 second get status disconnected and then suddenly it's get connected.

Does anyone know how they are able to do this or other option to check Reachability?

I want discounted status when Off wifi and bluetooth.

I cannot find any online resources, please help. Here is my code:

This Code working well on WatchOS3 it's only happen on WatchOS4.

- (void)sessionReachabilityDidChange:(WCSession *)session
{
    if([[WCSession defaultSession] isReachable]){

      [_lblPairedStatus setTextColor:[UIColor greenColor]];
      [_lblPairedStatus setText:@"connected"];
      [self playsound];

  }
  else
  {
        [_lblPairedStatus setTextColor:[UIColor redColor]];
        [_lblPairedStatus setText:@"disconnected"];
        [self notification:@"Your Phone is out of range!"];
        [self playsound];
  }

Any help is greatly appreciated!

BuLB JoBs
  • 841
  • 4
  • 20

0 Answers0