Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13155] Studio: Code changes in app.js are not being reflected in simulator when --deploy-type test

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-03-26T22:17:03.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.0, 2013 Sprint 06 JS, 2013 Sprint 06
ComponentsCLI
Labelsios, qe-3.1.0, qe-closed-3.1.0, qe-port, regression
ReporterOlga Romero
AssigneeChris Barber
Created2013-03-21T21:56:18.000+0000
Updated2013-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

Comments

  1. Michael Xia 2013-03-21

    Studio is passing in the wrong deploy type:
       "/usr/local/bin/titanium" "build" "--platform" "iphone" "--sdk" "3.1.0.v20130308171817" "--log-level" "trace" "--target" "simulator" "--ios-version" "6.0" "--device-family" "iphone" "--sim-version" "6.0" "--deploy-type" "test" "--retina" "--tall" "--skip-js-minify" "--no-colors" "--no-prompt"
       
    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.
  2. Chris Barber 2013-03-21

    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
  3. Olga Romero 2013-04-10

    Tested and verified fix with: Appcelerator Studio, build: 3.1.0.201304082106 SDK, build: 3.1.0.v20130409124549 CLI 3.1.0-cr

JSON Source