- (void)willActivate {
/
[super willActivate];
if ([WCSession isSupported]) {
WCSession *session = [WCSession defaultSession];
session.delegate = self;
[session activateSession];
NSLog(@"willActivate: %d",session.reachable);
}
}
- (void)sessionReachabilityDidChange:(WCSession *)session{
NSLog(@"sessionReachabilityDidChange: %d",session.isReachable);
}
Above code block prints
willActive:1
immediately.
However, after that it prints:
sessionReachabilityDidChange: 0
sessionReachabilityDidChange: 1
I am trusting session.reachable to send a message to iOS app, but that value has incorrect information.
If I go back and reopen this InterfaceController, same thing happens, except, this time sessionReachabilityDidChange is never called and reachable value is correct this time.