[TIMOB-19423] Ti.WatchSession.recentAppContext not updated by what is received from watch
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2015-08-28T09:21:43.000+0000 |
Affected Version/s | Release 5.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Eric Merriman |
Created | 2015-08-28T08:41:08.000+0000 |
Updated | 2017-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
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.
(y) created TIDOC-2294
Closing ticket as invalid.