I am developing a glance view for my Apple WatchOS2 app. I'am currently didn't fully understand the prequisites for a stable WatchConnectivity connection now. I have the strange situation, that in the simulator my ComplicationController could successfully a sendMessage Request. When I try to look at my glance, the sendMessage request failed with:
Error Domain=WCErrorDomain Code=7007
"WatchConnectivity session on paired device is not reachable."
UserInfo={NSLocalizedDescription=WatchConnectivity session
on paired device is not reachable.
I have to admit, that I didn't start my app on the simulator. But why could the ComplicationController communicate and the WatchController won't. And I found no explanation about the error 7007 on the internet.
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
WCSession.defaultSession().sendMessage(["request": "getGlancesImages" ], replyHandler: {
(result) -> Void in
self.processGetGlancesImages(result)
}, errorHandler: { NSLog("WatchGlanceController2. \($0.description)") } )
}
I am currently developing with WatchOS2 Beta 5 and iOS 9 Beta 5. I am fully aware, this is a beta but this is the last beta before release.