Is there any way to notify user in Apple Watch that the iPhone is now out of range and when it comes back in range. How can we do it in watch extension.
Thanks in advance.
Is there any way to notify user in Apple Watch that the iPhone is now out of range and when it comes back in range. How can we do it in watch extension.
Thanks in advance.
From a formal perspective, Apple have not given any indication of how this will be handled.
However, given the pairing and communication area handled by the OS without app involvement, it seems almost certain that any notifications to the user regarding connection issues on the watch (and at the phone end) will be handled by the Watch OS as well. My guess would be that a user will be given an opportunity to resolve the loss of connectivity, or to quit the Watch app if they cannot. From a developer perspective, it is highly likely our apps will not be able to distinguish between an unresolved loss of connectivity and the user quitting an app normally, with the same notification being sent to the Watch Extension for either, but this is only a guess.
It should be noted that there is no third party developer code running on the watch for the current Watch apps, just a UI, so even an unresolved loss of connection will not result in any data loss. If the Watch Extension (which runs on the iPhone) is quit by the OS due to loss of connection to the watch, it will still be able to do its usual data storage and cleanup.
You can find all connectivity state change notification in the WCSession documentation.
With watchOS 2.0 you can. To do this you would add these to your ExtensionDelegate if you wanted your Apple Watch to get a notification:
You should also add WCSessionDelegate to your ExtensionDelegate.
So on WatchOS 2 that is possible !
You have to do on iPhone side :
First :
Then :
I hope It would help you :)
From the current point of knowledge this will probably not be possible.
From Apple's WatchKit App Architecture
That means, the code is executed on the iPhone. If the iPhone is out of reach it will not be possible to run the app on the watch.