WCSession not working with glances

Hello all,


Im trying to use watch connectivity with Messaging to retrieve data from the phone for my glance as well as my app (interface). The interface controller seems to be working. However for the GlanceInterface WCSession never is "reachable" thus not allowing me to use messaging to retrieve data. Do we need to start a WCSession in both the Glance and the interface? or just one maybe in the extensiondelegate.h. If we do need to start a session in the glance and interface has anyone run into the issue where it never is reacable in the glance?


I noticed is reachable is only true when the watch app is in the foreground. Does anyone have suggestions when the app is started to call messaging, it seems if I try to make the call right in the "willactivate" it will return an "device not reachable" error, but I dont want the users to have to push a button to load data , i want it loaded when the app is started.


Any suggestions or ideas would be great !


In glance and interface

- (void)willActivate {
     [super willActivate];
     if ([WCSession isSupported])
     {   
     WCSession *session = [WCSession defaultSession];
     session.delegate = self; [session activateSession];
     [session activateSession];
     }
}

Replies

I dont have a solution for the problem as I'm having the same issues: I also start a defaultSession on the watch in the InterfaceController as well as the GlanceController. The InterfaceController works fine. The Glance Does not. If I find a solution or if you do let me know.

Ive put in a bug request, ill let you know what they say! it may just be the simulator acting funky.

Thanks

Thanks for filing a bug! Would you mind telling me what the radar number is so that I can make sure it gets to the right people promptly?

Bug id :


22313302


it said it was closed due to duplicate 22108334


Would it be possible to let me know of that bug and its result?

Thanks! The bug has been fixed so you can expect this to show up in a seed/release soon.

hello viking,


I still cannot achieve reachability with glances in Xcode 7 Beta 6. Is this going to work in a future release?

Hi viking,


Just to confirm what ImDeveloper1 wrote above - I'm having the exact same issue.

I really hope it gets fixed fixed before GM in order to be able to (still) have a Glance on the iOS9 update of my app. I'm willing to try any workaround, to be honnest, but if WCSession cannot connect then I'm not sure if there is anything I can do to get data in the first place. The data that is being requested/sent in my case is quite small, just a simple dictionary of values.

In any case, I can definitely confirm that it's not working in Xcode 7 beta 6. I had filed a similar radar about this, in case it helps, number 22247277

Like ptsochantaris and ImDefeloper1 I'm having the same problem with 7 beta 6. WCSession is just not reacdhable. A real bummer. Yep my data is small as well. The simplest of interfaces is sure having issues. This is the last thing I need to get working. I'm Patiently waiting.


if ([[WCSession defaultSession] isReachable]) {

NSLog(@"SESSION REACHABLE Watch Glance");

}

To confirm what Kaj, ptsochantaris, and lmDeveloper1 have reported. I am also getting WCSession reachability issues in the Glance. I also experience it often in the main app where WCSession is not reachable, especially on start up.


Also, I can't debug the watchOS2 device from xcode. It rarely attaches (1 out of 10 tries). I have to build and run it, then restart the watch because if I don't I will get the spinning loading indicator.


On the bright side, the reloadRootControllers api seems to have been fixed.


WatchOS2

Xcode 7 beta 6

10.10.4

sessionReachabilityDidChange is not getting called in Glances and it is always unreachable. This is the problem that you are talking about, right?


Viking from Apple Staff wrote that it is fixed. That fix is not yet alive, right? So it will be available in the official release of iOS9 and beta, right?

I havent gotten a chance to try it today with the GM xcode 7, has anyone had any luck with glances and reachability yet? Ill report back tomorrow with my status

I tried. There are still issues with reachability in general. But the bug when Glance couldn't talk to iphone completely is fixed in GM.

I am issuing this problem with Glance's communication for the first time with GM, with previous betas there was no problem for me...

sessionReachabilityDidChange is still not getting called and sendMessage does not work as expected too in glances...