{ "id": "154232", "key": "TIMOB-20226", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-04-07T09:22:17.000+0000", "created": "2016-01-12T10:48:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.4.0", "watch" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-08-08T17:10:21.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "iOS 9.3 introduces some new API's of the WatchConnectivity framework:\r\n\r\n- WCSession.activationState\r\n- \\[WCSessionDelegate session:activationDidCompleteWithState:error:]\r\n- \\[WCSessionDelegate sessionDidBecomeInactive:]\r\n- \\[WCSessionDelegate sessionDidDeactivate:]\r\n- WCSessionActivationState\r\n- WCSessionActivationStateActivated\r\n- WCSessionActivationStateInactive\r\n- WCSessionActivationStateNotActivated\r\n\r\nThat will simply result in new events to be used to check the session state from the main application.", "attachment": [], "flagged": false, "summary": "iOS 9.3: Support new WatchConnectivity features", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 614, "state": "closed", "name": "2016 Sprint 07 SDK", "startDate": "2016-03-26T00:38:56.432Z", "endDate": "2016-04-09T00:38:00.000Z", "completeDate": "2016-04-11T04:41:08.231Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "376873", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7722\r\n\r\nDemo:\r\n{code:javascript}\r\n\r\nTi.WatchSession.activateSession();\r\n\r\nTi.API.warn(\"activationState: \" + Ti.WatchSession.activationState);\r\nTi.API.warn(Ti.WatchSession.ACTIVATION_STATE_NOT_ACTIVATED); // 0\r\nTi.API.warn(Ti.WatchSession.ACTIVATION_STATE_INACTIVE); // 1\r\nTi.API.warn(Ti.WatchSession.ACTIVATION_STATE_ACTIVATED); // 2\r\n\r\nTi.WatchSession.addEventListener(\"inactive\", function(e) {\r\n\tTi.API.warn(\"Watch became inactive\");\r\n\tTi.API.warn(e);\r\n});\r\n\r\nTi.WatchSession.addEventListener(\"deactivate\", function(e) {\r\n\tTi.API.warn(\"Watch was deactivated\");\r\n\tTi.API.warn(e);\r\n});\r\n\r\nTi.WatchSession.addEventListener(\"activationCompleted\", function(e) {\r\n\tTi.API.warn(\"Watch activation completed\");\r\n\tTi.API.warn(e);\r\n});\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-14T00:39:07.000+0000", "updated": "2016-02-14T13:20:42.000+0000" }, { "id": "378849", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I tried to FR this but, it doesn't seem to work, and it gets stuck at:\r\n{code}\r\n[TRACE] [ioslib] Waiting for Watch App to install...\r\n{code}\r\n\r\nHere's how to reproduce:\r\n(With Xcode 7.3 installed)\r\n1. I scons'ed the PR.\r\n2. I installed the scon'sed package. \r\n3. *ti create*\r\n4. in tiapp.xml make sure it's sdk version is the one i must installed\r\n5. in project folder, *ti create --type applewatch*\r\n6. *ti build -p ios --launch-watch-app*\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-06T14:54:33.000+0000", "updated": "2016-04-04T09:55:08.000+0000" }, { "id": "378858", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is weird..Are you sure it is related to the PR and works without? Will re-validate tomorrow.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-06T18:00:02.000+0000", "updated": "2016-03-06T18:00:02.000+0000" }, { "id": "379173", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-08T15:25:08.000+0000", "updated": "2016-03-08T15:25:08.000+0000" }, { "id": "379211", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~hansknoechel] TIMOB-20489 should not affect this.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-03-08T17:11:28.000+0000", "updated": "2016-03-08T17:11:28.000+0000" }, { "id": "380278", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~hansknoechel] the way I'm reading [Apple's docs|https://developer.apple.com/library/watchos/documentation/WatchConnectivity/Reference/WCSession_class/index.html#//apple_ref/doc/uid/TP40015237-CH1-SW56] you don't *need* to support the _\\*active_ methods. I wonder if - by adding these to {{Ti.WatchSession}} we actually *require* developers to implement the events on iOS side and the same methods on WatchOS side. That would make it a breaking change. Can't we make it optional? Only implement these methods if the events are used in the Titanium source code?\r\n\r\n{quote}\r\nIf your delegate does not implement the appropriate methods for asynchronous activation and activation state changes, your app opts out of multiple Apple Watch support altogether. Opting out has important implications for your app when the user switches from one Apple Watch to another. When a switch occurs, your app’s session is deactivated. When your app subsequently moves to the background, the system terminates your app. (Background execution modes do not prevent the termination of your app.) The next time your app launches, it connects with the new Apple Watch.\r\n{quote}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-21T20:32:30.000+0000", "updated": "2016-03-21T20:36:26.000+0000" }, { "id": "380279", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Which required methods do you mean? As far as I know, I only added new events and constants to track the state, didn't override something that could cause the above scenario.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-21T20:39:41.000+0000", "updated": "2016-03-21T20:39:41.000+0000" }, { "id": "380350", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "If your iOS and/or (important unclarity) WatchOS2 app does not implement the new methods iOS will terminate your iOS app when you background it after the user has switched to a new Apple Watch. The when you reopen the iOS app it will connect to the new Apple Watch.\r\n\r\nIf we implement these new methods in the Titanium SDK but the developer does not update his code to actually use them (the new events) then we might get unpredictable results.\r\n\r\nIf iOS will only enable asynchronously activation if both the iOS and WatchOS2 app (which seems to be the case, but I don't find the documentation 100% clear on that) then we're good, but we should check.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-22T10:47:38.000+0000", "updated": "2016-03-22T10:47:38.000+0000" }, { "id": "382058", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-07T09:21:59.000+0000", "updated": "2016-04-07T09:21:59.000+0000" }, { "id": "392635", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, was able to receive all 3 activationStates:\r\n{{Ti.WatchSession.ACTIVATION_STATE_NOT_ACTIVATED}}: Unpaired watch.\r\n{{Ti.WatchSession.ACTIVATION_STATE_INACTIVE}}: Switching paired watch to a secondary watch.\r\n{{Ti.WatchSession.ACTIVATION_STATE_ACTIVATED}}: Paired watch.\r\n\r\nTested On:\r\niPhone 6S (9.3.3) Device \r\nApple Watch (2.2.2) \r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.4.0.v20160804185318\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 5.4.0-40\r\nXcode 7.3.1\r\nNode v4.4.7\r\n\r\n*Closing ticket.*\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-08T17:09:58.000+0000", "updated": "2016-08-08T17:09:58.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }