How to check in applewatch it is connected with iphone?

I know that the iPhone has ...


    /* Check if iOS device is paired to a watch */
     @property (nonatomic, readonly, getter=isPaired) BOOL paired __WATCHOS_UNAVAILABLE;


How to check in applewatch it is connected with iphone?


For example:

http://i961.photobucket.com/albums/ae97/lucasc0rrea/IMG_5483_zpsj48youwo.jpg


Is there any method or delegate to whether this connected? I ask this, why show the user that they need to connect iPhone to use the app to watch.

Accepted Answer

You can check iPhone reachability using Watch Connectivity Framework.

Just activate a WCSession and then check if iPhone is reachable:

if (WCSession.defaultSession().reachable) {
     // do something
}

Thanks for the answer.


http://i961.photobucket.com/albums/ae97/lucasc0rrea/IMG_5483_zpsj48youwo.jpg


This screen is automatically displayed on the watch when the device is not connected? Why do I see all installed app which is a standard appear this screen, but when I perform the test on a project in xcode running on the device, and simulate the device disconnected this is not presented this default screen as the screenshot above.

???

This screen is automatically displayed on a not connected watch when running a watchOS 1 app.

WatchKit 2 apps are native and no longer require to be connected with an iPhone.

How to check in applewatch it is connected with iphone?
 
 
Q