I'm seeing the following error when running my app on device (Apple Watch Series 1 running watchOS 3 + iPhone 6 running iOS 10.0.1) and also when I run on the simulator (Apple Watch Series 2 + iPhone 7).
The code that triggers the error is running on the watch in my watch app extension's "override func willActivate() {...}" method.
session?.sendMessage(["handleWatchKitExtensionRequestMethod": "myMethodNameHere"], replyHandler: { (response) -> Void in
print(response);
}, errorHandler: { (error) -> Void in
print(error);
});
The errorHandler block always gets executed with the following message:
Error Domain=WCErrorDomain Code=7007 "WatchConnectivity session on paired device is not reachable." UserInfo={NSLocalizedDescription=WatchConnectivity session on paired device is not reachable.}
Is anybody else seeing this? Is there a fix for this? This same code works in our App Store version of the app even though that version has not been programmed specifically for iOS 10 or watchOS 3, but it works, as expected. Trying to get this to work in dev when I am targeting watchOS 3 and iOS 10 using Xcode I cannot get this code to work at all.
I read another thread and tried restarting my watch and my iPhone and this has no effect, still fails every time. Please advise if you're able to. Thank you.