{ "id": "171939", "key": "TIMOB-26216", "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": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-24T17:21:44.000+0000", "created": "2018-07-18T01:22:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "build", "cli", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-09-20T15:14:22.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": "*Summary:*\r\nThere is an iOS incremental build issue where if you build for the iOS Simulator first, then an iOS device afterwards, the resulting iOS app bundle will contain both encrypted {{.js}} files an unencrypted plain text {{.js}} files. Builds for device (ie: deployment type \"test\" and \"production\") must encrypt all {{.js}} files.\r\n\r\nThis is *+not+* an issue with production/release builds.\r\nThis is only an issue with debug builds.\r\n\r\n*Steps to reproduce:*\r\n# On Mac, open a \"Finder\" window.\r\n# Go to an existing Titanium project directory.\r\n# Delete its \"build\" directory if it has one.\r\n# Open a \"Terminal\" window.\r\n# In the terminal, {{cd}} to the same project directory.\r\n# Run: {{appc run -p ios -D development --build-only}}\r\n# Wait for the build to finish.\r\n# Run: {{appc run -p ios -D test --build-only}}\r\n# Wait for the build to finish.\r\n# In \"Finder\", go to directory: {{./build/iphone/build/Products/Debug-iphonesimulator}}\r\n# Right click on the app bundle file and select \"Show Package Contents\" from the popup menu.\r\n\r\n*Result:*\r\nThe app bundle for the \"test\" build contains plain text {{.js}} files such as \"app.js\" when it shouldn't. A \"test\" build must encrypt all {{.js}} files.\r\n\r\n*Notes:*\r\n* This is an incremental build issue. The app bundle includes both encrypted {{.js}} files and plain text {{.js}} files from the previous \"development\" build.\r\n* I'm not sure if the reverse is true. When doing a \"test\" build first and then doing a \"development\" build, the generated {{ApplicationRouting.m}} does not contain any assets.", "attachment": [], "flagged": false, "summary": "iOS CLI: Incremental build does not remove unencrypted JS files when switching deploy type from \"development\" to \"test\"", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "439303", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "The bug is simple. It has nothing to do with device or dist builds, debug vs release, the {{encryptJS}} flag, or going back and forth between sim and device builds.\r\n\r\nThe {{this.forceCleanBuild}} check doesn't take into account the {{\\-\\-deploy\\-type}} changing, which only changes if you explicitly set it via the command line for a sim or device build.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-07-18T15:22:23.000+0000", "updated": "2018-07-18T15:22:23.000+0000" }, { "id": "439327", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10187\r\nTest-Case: See above (can also be done with {{ti build}} instead of {{appc run}})\r\n\r\n[~cbarber] I placed it in the {{forceCleanBuild}} check so we get a fresh build directory and clean up all old (unencrypted) assets. If works fine locally, let me know your thoughts. Thanks!!\r\n\r\n*EDIT*: Can this also be a 7.4.0 or should we wait for 7.4.0?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-19T04:28:39.000+0000", "updated": "2018-07-19T04:43:34.000+0000" }, { "id": "441852", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix in SDK version {{7.5.0.v20180906093938}}. Incremental build now removes unencrypted JS files when switching deploy type from \"development\" to \"test\".\r\n\r\n*FR Passed (Test Steps)*\r\nFollowed the instructions above in the description\r\n{code:java}\r\nOn Mac, open a \"Finder\" window.\r\nGo to an existing Titanium project directory.\r\nDelete its \"build\" directory if it has one.\r\nOpen a \"Terminal\" window.\r\nIn the terminal, cd to the same project directory.\r\nRun: appc run -p ios -D development --build-only\r\nWait for the build to finish.\r\nRun: appc run -p ios -D test --build-only\r\nWait for the build to finish.\r\nIn \"Finder\", go to directory: ./build/iphone/build/Products/Debug-iphonesimulator\r\nRight click on the app bundle file and select \"Show Package Contents\" from the popup menu.\r\n{code}\r\nKnow longer able to see unencrypted JS files when switching deploy type from \"development\" to \"test\".\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.0.201808080937\r\nAPPC CLI: 7.0.7-master.1\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13.6\r\nNode.js Version: 8.9.1\r\nXcode 10.0 GM\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-20T15:14:13.000+0000", "updated": "2018-09-20T15:14:13.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }