{ "id": "150277", "key": "TIMOB-19336", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-08-11T18:36:33.000+0000", "created": "2015-08-08T08:42:20.000+0000", "epic": { "id": 149396, "key": "TIMOB-19145", "name": "iOS: iOS 9 Updates", "summary": "iOS: iOS9 Updates", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "watchOS2", "watchkit" ], "versions": [ { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-17T18:06:41.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": "10207", "name": "Tooling" } ], "description": "Was trying to integrate my work on watch connectivity with the latest timobile SDK. There is an error when communicating between watch and phone simulators, stating that the watch app is not installed, but it is.\r\n\r\nDid some investigations and realised that the build settings on my native Xcode project vs the ti build generated Xcode project is different for targets watchapp and watch extension. See attached screenshots to see the difference. basically, the base SDK on watch app and watch extension should be WatchOS2, and not iOS9. I believe we need to change it to WatchOS2 with the correct architecture in order to get the watch app running on WatchOS2.\r\n\r\nh4. Steps to reproduce\r\n1. *ti create* titanium app\r\n2. enter project folder\r\n3. *ti create* apple watch\r\n4. enter extensions folder and open apple watch Xcode project\r\n5. enter storyboard and add a new label with some text\r\n6. *ti build -p ios -I 9.0 --launch-watch-app*\r\n\r\nh4. Actual result\r\nyou will see the label with the new text on the watch app, indicating it's correctly working.\r\nHowever, if you enter the build folder, and open the Xcode project, click on the watch app target and watch app extension target, they are NOT using watchOS2 as base SDK.\r\n\r\nh4. Expected result\r\nIt is supposed to be watchOS2. We can either automatically force all watch apps to watchOS2 for builds on Xcode 7, or we include a flag to indicate in ti build (or ti create) telling the CLI we want to build for watch kit 1.0 or watch OS2.\r\n\r\n*Note*: For watch app and watch extension targets, the base SDK in the build folder generated by *ti build*, *as well as* the base SDK of the Xcode project in the extensions folder created by *ti create*, are not WatchOS2.", "attachment": [ { "id": "56380", "filename": "correct watch app build setting.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-08T08:45:15.000+0000", "size": 104098, "mimeType": "image/png" }, { "id": "56379", "filename": "correct watch ext build setting.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-08T08:45:19.000+0000", "size": 104413, "mimeType": "image/png" }, { "id": "56381", "filename": "generated watch app build setting.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-08T08:45:11.000+0000", "size": 125211, "mimeType": "image/png" }, { "id": "56378", "filename": "generated watch ext build setting.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-08T08:45:22.000+0000", "size": 125382, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS9: WatchOS2 build settings have wrong values", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Xcode 7 beta 5\r\nTitanium-mobile SDK latest master build (7 Aug 2015)\r\nTitanium CLI 4.1.4", "closedSprints": [ { "id": 465, "state": "closed", "name": "2015 Sprint 16 Tooling", "startDate": "2015-08-03T16:11:05.714Z", "endDate": "2015-08-15T01:11:00.000Z", "completeDate": "2015-08-18T00:59:18.251Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "359392", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Another note. I tried to change the build settings manually in the Xcode project in the extensions folder, to see if i can do a workaround. \r\nThen i got an error about bundle identifier. \r\nI changed these in the plist to com.appcelerator.sg.SGTestWatch3.watchkitapp and com.appcelerator.sg.SGTestwatch3.watchkitextension but i still get an error on CLI when i call\r\n*ti build -p ios -I 9.0 --launch-watch-app*.\r\n\r\nThe error is\r\n{quote}\r\n[TRACE] ** CLEAN FAILED **\r\n[TRACE] The following build commands failed:\r\n[TRACE] Check dependencies\r\n[TRACE] (1 failure)\r\n[ERROR] An error occurred during build after 1s 896ms\r\n[ERROR] 65\r\n{quote}", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-08T09:03:23.000+0000", "updated": "2015-08-08T09:03:23.000+0000" }, { "id": "359584", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This works just fine. WatchKit 1 apps use the iphoneos SDK to build. WatchKit 2 apps uses watchos.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-11T18:36:33.000+0000", "updated": "2015-08-11T18:36:33.000+0000" }, { "id": "359645", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber], I seem to be able to only build for watchkit 1. Can you please explain to me what build options or flags i have to use to build watcheos2 specific app? Is my steps above correct? ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-12T07:27:54.000+0000", "updated": "2015-08-12T07:27:54.000+0000" }, { "id": "359723", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~cng] Here's all you need to do:\r\n\r\n1. Create a new project: {{ti create --type app --name foo --id com.appc.foo --platforms all --url http://foo --workspace-dir .}}\r\n2. cd into the project: {{cd foo}}\r\n3. Add a WatchKit 2 app: {{ti create --type applewatch --name bar --template watchos2}}\r\n4. Build the app: {{ti build -p ios -I 9.0 --launch-watch-app}}", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-12T20:40:23.000+0000", "updated": "2015-08-12T20:40:23.000+0000" }, { "id": "413526", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-17T18:06:41.000+0000", "updated": "2017-03-17T18:06:41.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }