[TIMOB-26216] iOS CLI: Incremental build does not remove unencrypted JS files when switching deploy type from "development" to "test"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-08-24T17:21:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.0 |
Components | iOS |
Labels | build, cli, ios |
Reporter | Joshua Quick |
Assignee | Hans Knöchel |
Created | 2018-07-18T01:22:16.000+0000 |
Updated | 2018-09-20T15:14:22.000+0000 |
Description
*Summary:*
There 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 In the terminal,
Run:
Run:
In "Finder", go to directory:
.js
files an unencrypted plain text .js
files. Builds for device (ie: deployment type "test" and "production") must encrypt all .js
files.
This is *+not+* an issue with production/release builds.
This is only an issue with debug builds.
*Steps to reproduce:*
On Mac, open a "Finder" window.
Go to an existing Titanium project directory.
Delete its "build" directory if it has one.
Open a "Terminal" window.
In the terminal, cd
to the same project directory.
Run: appc run -p ios -D development --build-only
Wait for the build to finish.
Run: appc run -p ios -D test --build-only
Wait for the build to finish.
In "Finder", go to directory: ./build/iphone/build/Products/Debug-iphonesimulator
Right click on the app bundle file and select "Show Package Contents" from the popup menu.
*Result:* The 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.
*Notes:*
* This is an incremental build issue. The app bundle includes both encrypted .js
files and plain text .js
files from the previous "development" build.
* 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.
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. Thethis.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.PR: https://github.com/appcelerator/titanium_mobile/pull/10187 Test-Case: See above (can also be done with
ti build
instead ofappc run
) [~cbarber] I placed it in theforceCleanBuild
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!! *EDIT*: Can this also be a 7.4.0 or should we wait for 7.4.0?*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". *FR Passed (Test Steps)* Followed the instructions above in the descriptionKnow longer able to see unencrypted JS files when switching deploy type from "development" to "test". *Test Environment*