[TIMOB-13155] Studio: Code changes in app.js are not being reflected in simulator when --deploy-type test
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-26T22:17:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0, 2013 Sprint 06 JS, 2013 Sprint 06 |
Components | CLI |
Labels | ios, qe-3.1.0, qe-closed-3.1.0, qe-port, regression |
Reporter | Olga Romero |
Assignee | Chris Barber |
Created | 2013-03-21T21:56:18.000+0000 |
Updated | 2013-04-10T22:57:03.000+0000 |
Description
While running app on simulator I encountered this issue. When changes in JS code are made to app.js, they were not reflected in the simulator. Only deleting the project's build folder or cleaning project applies changes.
Test steps:
1. Run the following code in the simulator
var win = Ti.UI.createWindow({
backgroundColor:"green"
});
var button = Ti.UI.createButton({
title:"click me"
});
var Cloud = require('ti.cloud');
button.addEventListener("click", function() {
Ti.API.info('click fired');
Cloud.Users.login({
login : 'user',
password : 'password'
}, function(e) {
if (e.success) {
alert('worked');
} else {
alert('error');
Ti.API.info(e.message);
}
});
});
win.add(button);
win.open();
2. Change the following
backgroundColor:"green" to
backgroundColor:"blue"
3. Run the app in simulator again without cleaning with --deploy-type test
Actual result:
1. Screen is green
3. Screen is green
Expected result:
1. Screen should be green
2. Screen should be blue
Also we were able to reproduce this issue using an Alloy project and Studio. Building using CLI from the terminal works as expected.
The environment:
1)
TiStudio: 3.1.0.201303202340
TiSDK: 3.1.0.v20130319125050
TiCLI: CLI version 3.0.24
Node version: 0.8.17
Alloy: 1.1.0
2)
TiStudio: 3.1.0.201303202340
TiSDK: 3.1.0.v20130321105651
TiCLI: CLI version 3.0.25
Node: 0.8.17
Alloy: 1.1.0
Studio is passing in the wrong deploy type:
The deploy type should not be test since this is regular Titanium Studio; it should be "development". We should also not be passing in "--skip-js-minify" flag; opening the launch config dialog shows "Enable JavaScript Minification" is enabled.
To test, build an iOS app for the simulator, but set the --deploy-type to test. Change something like the background color and recompile and you should see the change. Master pull request: https://github.com/appcelerator/titanium_mobile/pull/4008
Tested and verified fix with: Appcelerator Studio, build: 3.1.0.201304082106 SDK, build: 3.1.0.v20130409124549 CLI 3.1.0-cr