Tuesday, July 28, 2015

WatchOS 2.0 beta4: WCSession working a LOT better!

Some good news on this end. After completing the upgrade of Watch and iPhone to beta4, WCSession is working a lot better. With the same ttl source from before upgrade; reachability and connectivity makes a lot more sense. For example:
  • reachability seems to stay the same as long as the Watch and iPhone are in range.
  • it is also not a function of either application being live and in focus. This is huge as now my iPhone background thread continues to dequeue even though the Watch is displaying some other task (or is in idle mode)
  • killing the iPhone app doesn't change Watch's reachability to iPhone. (but the process timer commands are stopped as expected)
(updates)
  • the iPhone appears to suspend process timers when the application is not in focus.
  • BUT, these timers seems to wake up when the phone is awake at lock screen when the app is in focus under the lock screen!?!
  • (the above feels like some rickety support for the badge at the lower left corner of iPhone indicating when apps on the Watch are doing something interesting)
  • there is some pause or suspend of a session during a voice call too
Regardless, this does change the strategy a bit. It may now be possible to have the Watch initiate dequeue events to the iPhone (perhaps even by using the WCSession.transferUserInfo which is nicely queued for us). I will work on background threads on the Watch now, having it initiate transfers to the iPhone, instead of the other way around.

p.s. upgrade was nominal this time; configuration, Xcode symbols, paring, etc. It just worked.


No comments:

Post a Comment