ssttonn / flutter_watch_os_connectivity

A plugin that provides a wrapper that enables Flutter apps to communicate with apps running on WatchOS.
BSD 3-Clause "New" or "Revised" License
7 stars 12 forks source link

WatchOS Reachability is incorrect #1

Open dirkvranckaert opened 1 year ago

dirkvranckaert commented 1 year ago

I'm implementing this implementation with a WatchOS connectivity part. And I noticed from the very beginning that my confiugration must be quite ok since my watch app can send messages to my Flutter app. I can read the data sent with it etc.

However when I want to send a message back or reply to the original message I cannot... Reason is that the checkSessionReachability always returns false. However the WCSession is initiated and it reports to be active. So I guess for some reason (since the communication in the other way is working) the reachability check is not going right...

ssttonn commented 1 year ago

Hi, thanks for your feedback, I'm checking the logic of it again.

According to apple:

This property is YES when the WatchKit extension and the iOS app can communicate with each other.

Specifically:

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).

iOS app. A paired and active Apple Watch is in range, the corresponding WatchKit extension is running, and the WatchKit extension’s reachable property is YES. In all other cases, the value is NO.

You can read more about it here.

Did you test on simulator or on real device?

VocsyAniket commented 4 months ago

I also have this same issue because when I do the checkSessionReachability check I get the reachable value false and I am testing in the simulator device.

Wackymax commented 2 months ago

I also have the same problem where it is very unreliable. The swift code seems to think the session is reachable but the flutter code does not.