Reputation: 109
I have an iOS app (MyApp) with a corresponding watch app (MyAppWatch). Using WatchConnectivity, I want to establish a connection between both device. Activating a WC session on both devices is succesful, but when testing the connection, something does wrong. It turns out that my session.isReachable
returns false
. Also, I get a message that WCSession counterpart app not installed. It may be interesting to add that session.isPaired (on iOS) returns true, so nothing seems to be wrong in the connection between the devices. I need isReachable to be true by installing the counterpart app on the watch, before being able to sendMessage(). But how? And why is this failing?
What I've tried so far:
Can someone please help fixing this, I'm struggeling for days now.
Upvotes: 5
Views: 1534
Reputation: 9
Assuming you are using the simulators, one of the reasons why the WCSession might not be working is because you didn't pair the watch and the iPhone simulators.
If you go to Window > Devices and Simulators > Simulators it will let you also add a watch to each iPhone.
Call it a specific name so it's easy to find it.
You can also open both devices and go in the Watch app on the iPhone, so you can check that they are actually synced.
Usually when you run the app on that specific watch simulator it will automatically install the app also on the iPhone and it will say something like this:
This article covers some of the most common errors with connectivity (like WCSession counterpart app not installed), maybe it might help: https://medium.com/swlh/how-to-use-watchconnectivity-to-send-data-from-phone-to-watch-plus-most-common-errors-793d41976618
Upvotes: -1