How to Check Whether iPhone and Apple Watch Are Connected

Check if iPhone is paired with apple watch?

So since WatchOS 2 that is possible !

You have to do on iPhone side :

First :

import WatchConnectivity

Then :

   if WCSession.isSupported() { // check if the device support to handle an Apple Watch
let session = WCSession.default()
session.delegate = self
session.activate() // activate the session

if session.isPaired { // Check if the iPhone is paired with the Apple Watch
// Do stuff
}
}

I hope It would help you :)

Is there a way to detect if an Apple Watch is paired with an iPhone?

The answer is yes but you have to support watchOS 2 and iOS9 to do it.
You need to check the property pairedfrom WCSession class.

You can find all the information at Watch Connectivity Framework Reference. I also recommend to watch this video from WWDC 2015 and read this tutorial

Check internet connection in Apple Watch

You can use WatchConnectivity framework and then communicate with iOS to check whether the internet is available or not.

Another way is you can use URLSession in watch and check if you can get the data then you are connected to the internet.

The better approach would be with an iOS device. Use Reachability, in iOS and send an appropriate flag to WatchOS and make it Observable so it can know when the Internet is available.

Apple Watch app detect if a apple watch is paired with the phone

There is no built-in method (at least in the WatchKit SDK) to determine if a Watch has been paired with an iPhone. A common strategy is to write a BOOL to a shared NSUserDefaults (using app groups) so that the iPhone knows that the Watch app has been run at least once. That's the technique I've used in my own app.



Related Topics



Leave a reply



Submit