I am also struggling with the same issue. In the docs I read, that I need to wait until session(session:activationDidCompleteWith:error) returns with a "activated" state before I can sendMessage() on the session.
But when I wait until that happens and only then call sendMessage, I still receive an error:
["WCSession sendMessage.error: Error Domain=WCErrorDomain Code=7007 "WatchConnectivity session on paired device is not reachable." UserInfo={NSLocalizedDescription=WatchConnectivity session on paired device is not reachable.}"]
I am at a loss and I already implemented something ugly like delaying the sendMessage() for a second after calling session.activate().
There must be some way to tell, when it is safe to sendMessage(). Waiting for the callback 'activationDidCompleteWith' doesn't seem to be one of them :-(
Topic:
App & System Services
SubTopic:
Core OS
Tags: