Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14101] LiveView: app.js in Resources Dir overwritten on recompile

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-06-10T22:56:25.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 12 JS, 2013 Sprint 12, Release 3.1.1, Release 3.2.0
ComponentsCLI, iOS, LiveView
Labelsn/a
ReporterChristian Sullivan
AssigneeChristian Sullivan
Created2013-06-04T17:04:56.000+0000
Updated2013-12-03T20:36:02.000+0000

Description

When project is recompiled while using liveview Users app.js in Resources dir is being overwritten with liveview.js Test Case: 1. $ ti build -p ios --liveview 2. $ ti build -p ios --liveview 3. $ cat app.js Expected Result: User's app.js should not be modified Actual Result: User's app.js is overwritten with contents of liveview.js

Comments

  1. Ingo Muschenetz 2013-06-10

    My test case is a little different:

    $ ti build -p ios

    $ ti build -p ios --liveview

    $ cat app.js

    It appears that the first build does a symlink, and then the liveview overwrites the contents of the symlink, overwriting app.js: build (no LiveView)
       Ingos-MacBook-Pro:LVDefault4 ingo$ cd build/iphone/build/Debug-iphonesimulator/LVDefault4.app
       Ingos-MacBook-Pro:LVDefault4.app ingo$ ls -la
       total 22256
       drwxr-xr-x  19 ingo  staff      646 Jun 10 14:54 .
       drwxr-xr-x   4 ingo  staff      136 Jun 10 14:54 ..
       -rw-r--r--   1 ingo  staff   570121 Jun 10 14:53 Default-568h@2x.png
       -rw-r--r--   1 ingo  staff   517419 Jun 10 14:53 Default-Landscape.png
       -rw-r--r--   1 ingo  staff   551670 Jun 10 14:53 Default-Portrait.png
       -rw-r--r--   1 ingo  staff   114262 Jun 10 14:53 Default.png
       -rw-r--r--   1 ingo  staff   380255 Jun 10 14:53 Default@2x.png
       -rw-r--r--   1 ingo  staff     1209 Jun 10 14:53 Info.plist
       lrwxr-xr-x   1 ingo  staff       86 Jun 10 14:53 KS_nav_ui.png -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/KS_nav_ui.png
       lrwxr-xr-x   1 ingo  staff       89 Jun 10 14:53 KS_nav_views.png -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/KS_nav_views.png
       -rwxr-xr-x   1 ingo  staff  9181596 Jun 10 14:54 LVDefault4
       -rw-r--r--   1 ingo  staff        8 Jun 10 14:53 PkgInfo
       lrwxr-xr-x   1 ingo  staff       79 Jun 10 14:53 app.js -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/app.js
       -rw-r--r--   1 ingo  staff     4275 Jun 10 14:53 appicon.png
       -rw-r--r--   1 ingo  staff      335 Jun 10 14:53 debugger.plist
       drwxr-xr-x   5 ingo  staff      170 Jun 10 14:53 modules
       -rw-r--r--   1 ingo  staff      335 Jun 10 14:53 profiler.plist
       -rw-r--r--   1 ingo  staff      190 Jun 10 14:53 stylesheet.plist
       -rw-r--r--   1 ingo  staff    28632 Jun 10 14:53 ti.cloud.js
       
    build (LiveView from clean):
       Ingos-MacBook-Pro:Debug-iphonesimulator ingo$ cd LVDefault4.app
       Ingos-MacBook-Pro:LVDefault4.app ingo$ ls -la
       total 22288
       drwxr-xr-x  20 ingo  staff      680 Jun 10 14:50 .
       drwxr-xr-x   4 ingo  staff      136 Jun 10 14:50 ..
       -rw-r--r--   1 ingo  staff   570121 Jun 10 14:50 Default-568h@2x.png
       -rw-r--r--   1 ingo  staff   517419 Jun 10 14:50 Default-Landscape.png
       -rw-r--r--   1 ingo  staff   551670 Jun 10 14:50 Default-Portrait.png
       -rw-r--r--   1 ingo  staff   114262 Jun 10 14:50 Default.png
       -rw-r--r--   1 ingo  staff   380255 Jun 10 14:50 Default@2x.png
       -rw-r--r--   1 ingo  staff     1209 Jun 10 14:50 Info.plist
       lrwxr-xr-x   1 ingo  staff       86 Jun 10 14:50 KS_nav_ui.png -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/KS_nav_ui.png
       lrwxr-xr-x   1 ingo  staff       89 Jun 10 14:50 KS_nav_views.png -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/KS_nav_views.png
       -rwxr-xr-x   1 ingo  staff  9181596 Jun 10 14:50 LVDefault4
       -rw-r--r--   1 ingo  staff        8 Jun 10 14:50 PkgInfo
       lrwxr-xr-x   1 ingo  staff       79 Jun 10 14:50 _app.js -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/app.js
       -rw-r--r--   1 ingo  staff    13026 Jun 10 14:50 app.js
       -rw-r--r--   1 ingo  staff     4275 Jun 10 14:50 appicon.png
       -rw-r--r--   1 ingo  staff      335 Jun 10 14:50 debugger.plist
       drwxr-xr-x   5 ingo  staff      170 Jun 10 14:50 modules
       -rw-r--r--   1 ingo  staff      335 Jun 10 14:50 profiler.plist
       -rw-r--r--   1 ingo  staff      190 Jun 10 14:50 stylesheet.plist
       -rw-r--r--   1 ingo  staff    28632 Jun 10 14:50 ti.cloud.js
       
    build (regular, then LiveView):
       Ingos-MacBook-Pro:LVDefault4 ingo$ cd build/iphone/build/Debug-iphonesimulator/LVDefault4.app
       Ingos-MacBook-Pro:LVDefault4.app ingo$ ls -la
       total 22264
       drwxr-xr-x  20 ingo  staff      680 Jun 10 15:00 .
       drwxr-xr-x   4 ingo  staff      136 Jun 10 14:54 ..
       -rw-r--r--   1 ingo  staff   570121 Jun 10 15:00 Default-568h@2x.png
       -rw-r--r--   1 ingo  staff   517419 Jun 10 15:00 Default-Landscape.png
       -rw-r--r--   1 ingo  staff   551670 Jun 10 15:00 Default-Portrait.png
       -rw-r--r--   1 ingo  staff   114262 Jun 10 15:00 Default.png
       -rw-r--r--   1 ingo  staff   380255 Jun 10 15:00 Default@2x.png
       -rw-r--r--   1 ingo  staff     1209 Jun 10 14:53 Info.plist
       lrwxr-xr-x   1 ingo  staff       86 Jun 10 15:00 KS_nav_ui.png -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/KS_nav_ui.png
       lrwxr-xr-x   1 ingo  staff       89 Jun 10 15:00 KS_nav_views.png -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/KS_nav_views.png
       -rwxr-xr-x   1 ingo  staff  9181596 Jun 10 14:54 LVDefault4
       -rw-r--r--   1 ingo  staff        8 Jun 10 14:53 PkgInfo
       lrwxr-xr-x   1 ingo  staff       79 Jun 10 15:00 _app.js -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/app.js
       lrwxr-xr-x   1 ingo  staff       79 Jun 10 14:53 app.js -> /Users/ingo/Documents/Appcelerator_Studio_Workspace/LVDefault4/Resources/app.js
       -rw-r--r--   1 ingo  staff     4275 Jun 10 15:00 appicon.png
       -rw-r--r--   1 ingo  staff      335 Jun 10 14:53 debugger.plist
       drwxr-xr-x   5 ingo  staff      170 Jun 10 14:53 modules
       -rw-r--r--   1 ingo  staff      335 Jun 10 14:53 profiler.plist
       -rw-r--r--   1 ingo  staff      190 Jun 10 15:00 stylesheet.plist
       -rw-r--r--   1 ingo  staff    28632 Jun 10 15:00 ti.cloud.js
       
  2. Christian Sullivan 2013-06-10

    FIXED in [MASTER]: https://github.com/appcelerator/liveview/commit/c9da9495de2173e10a6f8b3f8b59869d1e931ea6
  3. Ingo Muschenetz 2013-06-10

    Confirmed fixed using SDK 3.1.1.v20130531163723 on iOS simulator with simple Titanium classic 2-tabbed app.
  4. Michael Xia 2013-08-14

    Closing.

JSON Source