WCSession isReachable/sendMessage broken for watchOS fitness apps

In watchOS 4 Beta 4 (and possibly later versions of watchOS 3), the WCSession isReachable comment is returning false and sendMessage fails if my watch fitness app running a workout session is not actively displayed on the watch face. This worked fine in earlier versions of watchOS 3.


The documentation of the isReachable property states:


WatchKit extension. The iOS device is within range, so communication can occur and the WatchKit extension is running in the foreground, or is running with a high priority in the background (for example, during a workout session or when a complication is loading its initial timeline data).


What I observe is that if the watch app is running a workout session in the background, isReachable is FALSE and sendMessage fails.


Can others confirm this issue or have any insights?

wcsession.isReachable always returns true for me, even if it is not. For example, when the watch app is not launched, isReachable returns true.... so my sendMessage fails. How did you solve your issue?

Sounbds like you are hitting a bug. Please file a bug report with a sample project, or follow the instructions here:

https://developer.apple.com/bug-reporting/profiles-and-logs/?name=ids

to gather diagnostic information while reproducing the issue on your own devices.

Same issue. At first reachability is true, when there is real connection but fails to switch back to false when the Watch is black, it's not in foreground. It worked earlier with watchOS 3, not working with 4.3.1

There is no delegate call back to - (void)sessionReachabilityDidChange:(WCSession *)session

The issue persists on watchOS 7.3.1. Sometimes WCSession isReachable is true, sometimes it's false. Does it depend on the order of events i.e. start workout session <-> connect to iOS counterpart? I will test some more and see what I can find.
The issue is as follows: when user kills the app while the workout session is active, somehow this session survives and continues running (another bug of watchOS?). After returning to the watch app, the session is started again because the app is not aware that it already has a running session. Due to this workout session mismanagement, the WCSession thinks that the app is not using workout session and isReachable becomes false as soon as watch app goes to background.

Looks like the best course of action here is to fix the workout session behavior when the app is killed. Is there any workaround to this?
WCSession isReachable/sendMessage broken for watchOS fitness apps
 
 
Q