Hi together,
in my app the watch communicates continously with the iPhone via Watch Connectivity. On the simulator enviroment everthings work more or less ok. On the real watch I have the problem that the communication break when the watch is locked (of course, this is ok) but it's still broken when the watch is getting unlocked. I did implement the method for rechability changes (see below)
The method:
- (void)sessionReachabilityDidChange:(WCSession * _Nonnull)session {
NSLog(@"status changed");
if (navActive) {
[self actualizeNavDisplay];
}
else {
[self getInitialNavDisplay];
}
}In both methods (actualizeNavDisplay, getInitialNavDisplay I try to send some data which is never received by the iPhone.
if ([WCSession defaultSession]) {
WCSession *session = [WCSession defaultSession];
if (session.reachable) {
session.delegate = self;
[session activateSession];
NSDictionary* infoDict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObject:@"stopNav"] forKeys:[NSArray arrayWithObject:@"request"]];
[[WCSession defaultSession] sendMessage:infoDict
replyHandler:^(NSDictionary *replyHandler) {
}
errorHandler:^(NSError *error) {
}
];
}
}Any ideas?
One more question. How to debug on my real, hardware Watch?
Walter