{ "id": "146603", "key": "ALOY-1260", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-04-13T17:39:53.000+0000", "created": "2015-04-03T18:26:39.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-4.0.0" ], "versions": [ { "id": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-04-20T21:15:56.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": [], "description": "The manifest.json in the SDK is missing windowsphone (or windows) from the platforms array. This is causing windowsphone assets to be in a default alloy project on Mac, as well as windowsphone assets to be included in a packaged APK, on Mac.\r\nFile is: {{Titanium/mobilesdk/osx/4.0.0.Beta2/manifest.json}}\r\n\r\n*Steps to reproduce issue*:\r\n1. Open Studio\r\n2. Create a new project (default Alloy template)\r\n3. Package the project for Android store\r\n4. Navigate to the APK and rename it to a .zip file\r\n5. Extract the zip\r\n\r\n*Actual Results*:\r\n2. Notice that there is a windowsphone folder/assets in the {{app/assets}} folder\r\n5. Notice that there are windowsphone assets in {{/assets/Resources}} of the extracted APK\r\n\r\n*Expected Results*:\r\nThere should not be windowsphone resources in the project or APK", "attachment": [ { "id": "54797", "filename": "Screen Shot 2015-04-03 at 11.06.43 AM.png", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T18:26:39.000+0000", "size": 162111, "mimeType": "image/png" }, { "id": "54798", "filename": "Screen Shot 2015-04-03 at 11.20.17 AM.png", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T18:26:39.000+0000", "size": 37172, "mimeType": "image/png" } ], "flagged": false, "summary": "Windowsphone not in platforms list in manifest.json", "creator": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 4.0.0-Beta2\r\nStudio 4.0.0.201504021909\r\nAppc NPM: 0.3.37\r\nAppc CLI 0.2.229\r\nAlloy 1.6.0-alpha2", "closedSprints": [ { "id": 373, "state": "closed", "name": "2015 Sprint 07 Tooling", "startDate": "2015-03-28T00:00:53.618Z", "endDate": "2015-04-25T00:00:00.000Z", "completeDate": "2015-04-13T16:16:20.402Z", "originBoardId": 121 }, { "id": 377, "state": "closed", "name": "2015 Sprint 08 Tooling", "startDate": "2015-04-10T16:22:00.000Z", "endDate": "2015-04-25T00:00:00.000Z", "completeDate": "2015-04-30T19:39:26.044Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "348470", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please note that the fix is not to add it to the manifest, but rather, remove the assets.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T18:37:48.000+0000", "updated": "2015-04-03T18:37:48.000+0000" }, { "id": "348474", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~ingo] Sorry, but you are wrong. The suggested fix is the appropriate fix.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/cli/commands/_build.js#L2472-L2480\r\n\r\n{code}\r\nfunction (cb) {\r\n\tvar src = path.join(this.projectDir, 'Resources');\r\n\twarnDupeDrawableFolders.call(this, src);\r\n\tcopyDir.call(this, {\r\n\t\tsrc: src,\r\n\t\tdest: this.buildBinAssetsResourcesDir,\r\n\t\tignoreRootDirs: ti.availablePlatformsNames // <----------- ['android', 'iphone', 'mobileweb']\r\n\t}, cb);\r\n},\r\n{code}\r\n\r\n{{ti.availablePlatformsNames}} is the array of platforms from the manifest.json file. As we copy files from the Resources directory, we ignore all directories that have a name of another platform.\r\n\r\niOS does the same thing: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L3470-L3476\r\n\r\nSo does Mobile Web: https://github.com/appcelerator/titanium_mobile/blob/master/mobileweb/cli/commands/_build.js#L403\r\n\r\nHeck, even the Windows Phone platform! https://github.com/appcelerator/titanium_mobile_windows/blob/master/cli/commands/_build.js#L1243-L1250\r\n\r\nSo, the fix IS to add \"windowsphone\" to the array of platforms in the SDK's manifest.json.\r\n\r\nP.S. This would not be an issue had we taken my suggestion to have explicit \"Resources-android\", \"Resources-ios\", \"Resources-mobileweb\", etc directories in the project root. Putting platform-specific resources in the Resources directory and trying to identify which directories are platforms names is poor design.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-03T18:51:45.000+0000", "updated": "2015-04-03T18:51:45.000+0000" }, { "id": "348481", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber] We are not shipping any Windows Phone functionality in 4.0, so why should we add it to the manifest.json?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T19:53:19.000+0000", "updated": "2015-04-03T19:53:19.000+0000" }, { "id": "348482", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~ingo] Then don't create 4.0 SDK builds containing the Windows Phone platform.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-03T20:08:05.000+0000", "updated": "2015-04-03T20:08:05.000+0000" }, { "id": "348483", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So I'm not.\r\n\r\nhttp://jenkins.appcelerator.org/job/titanium_mobile_4.0.x/configure\r\n\r\nAnd I don't see it in the .zip file\r\n\r\nhttp://builds.appcelerator.com/mobile/4.0.0/mobilesdk-4.0.0.Beta2-osx.zip\r\n\r\nWhere is it sneaking in?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T20:25:03.000+0000", "updated": "2015-04-03T20:25:03.000+0000" }, { "id": "348487", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~ingo] Perhaps Eric created the test app with an SDK containing the Windows Phone platform, then switched to 4.0.0.Beta2?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-03T20:35:09.000+0000", "updated": "2015-04-03T20:35:09.000+0000" }, { "id": "348493", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I only have 4.0.0.Beta2 installed, however you can see the assets here:\r\n{code}\r\n/Users//Library/Application\\ Support/Titanium/mobilesdk/osx/4.0.0.Beta2/mobileweb/templates/packages/winstore/{{ProjectName}}/images\r\n{code}", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T21:07:06.000+0000", "updated": "2015-04-03T21:07:06.000+0000" }, { "id": "348494", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ah, Windows Hybrid.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T21:12:32.000+0000", "updated": "2015-04-03T21:12:32.000+0000" }, { "id": "348497", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "No, Windows Hybrid resources would be in the {{mobileweb}} directory.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-03T21:20:08.000+0000", "updated": "2015-04-03T21:20:08.000+0000" }, { "id": "348498", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Isn't that what he's saying? /mobileweb/templates/packages/winstore", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T21:25:52.000+0000", "updated": "2015-04-03T21:25:52.000+0000" }, { "id": "348503", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This is not a Windows Hybrid related issue. This is an Alloy issue introduced by ALOY-1085. This wouldn't be a problem if \"windowsphone\" was in the list of platforms in the manifest. Because Windows Phone is not shipping with 4.0.0, then Alloy should be fixed to determine what platforms the SDK supports before copying assets from the app/assets directory to the Resources directory. File a ticket.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-03T21:41:23.000+0000", "updated": "2015-04-03T21:41:23.000+0000" }, { "id": "348504", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Feon, can you please take a look?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-03T21:50:24.000+0000", "updated": "2015-04-03T21:50:24.000+0000" }, { "id": "348555", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "1_6_X: https://github.com/appcelerator/alloy/pull/680\r\nmaster: https://github.com/appcelerator/alloy/pull/682\r\n\r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-04-06T07:15:43.000+0000", "updated": "2015-04-06T18:03:27.000+0000" }, { "id": "350160", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am still seeing Windows assets in newly created Alloy projects: {{app/assets/windows}}.\r\nIs this intended?", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-20T20:22:38.000+0000", "updated": "2015-04-20T20:22:38.000+0000" }, { "id": "350169", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~ewieber] Yeah, that should be fine as long as the contents of that {{windows}} folder is not copied during compile.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-20T21:13:46.000+0000", "updated": "2015-04-20T21:13:46.000+0000" }, { "id": "350170", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "In that case, verified as fixed using: \r\n\r\nMacOS 10.10.3\r\nStudio 4.0.0.201504170803\r\nTi SDK 4.0.0.Beta3\r\nAppc NPM 0.3.44\r\nAppc CLI 0.2.250\r\nTi CLI 4.0.0-beta7\r\nAlloy 1.6.0-beta4\r\nNode v0.10.38\r\n\r\nWindowsphone assets are not copied into the apk on packaging.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-20T21:15:56.000+0000", "updated": "2015-04-20T21:15:56.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }