Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19549] iOS: JS files in Resources get minified if minification is not "skipped"

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-09-20T09:57:56.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.1
ComponentsiOS, Tooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2015-09-18T20:39:08.000+0000
Updated2015-09-22T20:41:21.000+0000

Description

JS files in the Resources dir are getting minified. This is due to a bug introduced in Ti SDK 5.0.0. To reproduce, do:
ti clean
ti build -p ios -T device --build-only --skip-js-minify
At this point, since we did't minify the JS files, the build/iphone/assets dir will contain symlinks to the original files in the Resources dir. titanium_prep happily encrypts them and all is good.
ti build -p ios -T device --build-only
Now the iOS build will minify and then encrypt. Except this time, when we write the minified JS code to the assets dir, the destination exists and it's a symlink! When it writes to the symlinked JS file, it modifies the original in the Resources dir.

Comments

  1. Chris Barber 2015-09-18

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7206 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7207
  2. Chee Kiat Ng 2015-09-20

    APPROVED. PRs merged.
  3. Ingo Muschenetz 2015-09-20

    To all, into order to install the update, do: [appc] ti sdk install --default --branch 5_0_X 5.0.0.v20150920030708
  4. Eric Wieber 2015-09-22

    Verified fixed, using: MacOS 10.11 (15A279b) Studio 4.3.0.201509151348 Ti SDK 5.0.1.v20150922062312 Appc NPM 4.2.0 Appc CLI 5.0.2-19 Ti CLI 5.0.4 Alloy 1.7.10 Arrow 1.2.62 Xcode 7.0 (7A218) Node v0.10.37 Java 1.7.0_45 preproduction Original JS files are not minified on builds.

JSON Source