{ "id": "153616", "key": "TIMOB-20099", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2015-12-04T09:25:39.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:05.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If you call {{Ti.WatchSession.updateApplicationContext()}} when WatchSession is not supported or no Apple Watch is paired to the iOS device we log a silent error here:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/bc85170157d3bebc5de1d61a9fe6e34bce84a8c9/iphone/Classes/WatchSessionModule.m#L174-L181\r\n\r\nHowever when the Watch App is not installed the call to {{\\[self watchSession\\] updateApplicationContext}} will fail and we throw an exception like:\r\n\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] column = 368;\r\n[ERROR] line = 1;\r\n[ERROR] message = \"Unable to update Application Context: Watch app is not installed.\";\r\n[ERROR] sourceURL = \"file:///var/mobile/Containers/Bundle/Application/75BC3D23-AF58-4AA4-ACBB-23667D7F7D27/Weather%20Watch.app/watchsession.js\";\r\n[ERROR] stack = \"[native code]\\nsendWeather@file:///var/mobile/Containers/Bundle/Application/75BC3D23-AF58-4AA4-ACBB-23667D7F7D27/Weather%20Watch.app/watchsession.js:1:368\\nfile:///var/mobile/Containers/Bundle/Application/75BC3D23-AF58-4AA4-ACBB-23667D7F7D27/Weather%20Watch.app/alloy/controllers/index.js:1:1600\\nonload@file:///var/mobile/Containers/Bundle/Application/75BC3D23-AF58-4AA4-ACBB-23667D7F7D27/Weather%20Watch.app/api.js:1:1279\";\r\n[ERROR] }\r\n{code}\r\n\r\nWe should check if the app is installed and just like when we check for support and paired, fail with a silent error in the console.", "attachment": [], "flagged": false, "summary": "iOS: Ti.WatchSession.updateApplicationContext should check if app is installed", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.1.1", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }