Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19423] Ti.WatchSession.recentAppContext not updated by what is received from watch

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2015-08-28T09:21:43.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFokke Zandbergen
AssigneeEric Merriman
Created2015-08-28T08:41:08.000+0000
Updated2017-03-21T16:59:05.000+0000

Description

When I send a new app context from the Watch app the watchSessionReceivedAppContext event is received by the Titanium app and it has the correct appContext. But when I then get the value of Ti.WatchSession.recentAppContext it is still empty. When I send a new app context from the Titanium app using Ti.WatchSession.updateAppContext() then Ti.WatchSession.recentAppContext is correctly updated.

Reproduce

Use the Ti 5.0 sample app: https://github.com/appcelerator-developer-relations/appc-sample-ti500 Use _Send AppCxt_ on the Watch and then check the logs:
[INFO]  [Ti.WatchSession:watchSessionReceivedAppContext] {"appContext":{"status":"App context from watch"},"bubbles":true,"type":"watchSessionReceivedAppContext","source":{},"cancelBubble":false}
[INFO]  [updateProperty(isSupported)] true
[INFO]  [updateProperty(isPaired)] true
[INFO]  [updateProperty(isWatchAppInstalled)] false
[INFO]  [updateProperty(isComplicationEnabled)] false
[INFO]  [updateProperty(isReachable)] true
[INFO]  [updateProperty(recentAppContext)] {}
https://github.com/appcelerator-developer-relations/appc-sample-ti500

Comments

  1. Chee Kiat Ng 2015-08-28

    https://developer.apple.com/library/prerelease/ios/documentation/WatchConnectivity/Reference/WCSession_class/index.html#//apple_ref/occ/instp/WCSession/applicationContext As according to this, the recentAppContext is the info sent *from* the titanium app, which is the correct behavior depicted here.
  2. Fokke Zandbergen 2015-08-28

    (y) created TIDOC-2294
  3. Lee Morris 2017-03-21

    Closing ticket as invalid.

JSON Source