In Watchkit detect when iPhone disconnects

My app mirrors some information on a watch, then plays audio based on the information from the iPhone, I know how to detect when watch disconnects from the phone using WCSession.default.isReachable but how do I do the same on the watch to stop the audio playing? The same line of code compiles in WatchKit but doesn't actually seem to do anything.


Any suggestions please?


Andrew

Did you look at sessionReachabilityDidChange in WCSessionDelegate?

Hi jbailey


Unfortunately this didn't work, it seems to only be called when the watch is inactive for awhile or if a diferent app is brought to the front. Any other suggestions?


Andrew

In Watchkit detect when iPhone disconnects
 
 
Q