Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12279] MobileWeb: JS files are not copied over if you put them in the mobileweb directory

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-01-16T10:54:02.000+0000
Affected Version/sRelease 3.0.1
Fix Version/sRelease 3.0.2, Release 3.1.0, 2013 Sprint 02 JS, 2013 Sprint 02
ComponentsMobileWeb
LabelsSupportTeam, mobileweb-deployment, qe-port, regression
ReporterMauro Parra-Miranda
AssigneeChris Barber
Created2013-01-14T17:10:43.000+0000
Updated2014-06-19T12:43:08.000+0000

Description

Problem description

Customers are used to use the "platform" directory for several versions of the same file. I.e., android/samefile.js iphone/samefile.js they know that the right samefile.js will get copied over when compiling. This is failing when you are doing mobileweb/samefile.js since the file samefile.js won't be copied over in the resultant compiled mobileweb.

Steps to reproduce

1. Create new project 2. Copy app.js to app.js in Resources 3. Copy result_iphone.js to Resources/iphone/result.js 4. Copy result_mobileweb.js to Resources/mobileweb/result.js 5. Compile for iphone. You will see a "I'm in the ios version" 6. compile for mobileweb. You will get an error.

Files

App.js
Ti.include('result.js');
var win = Ti.UI.createWindow({
	backgroundColor:'white',
	
});

var label = Ti.UI.createLabel({
	text:text, 
});

win.add(label);
win.open();

result_iphone.js
var text = "I'm in the iOS version";
result_mobileweb.js
var text = "I'm in the mobileweb version";

Comments

  1. Chris Barber 2013-01-14

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3709 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3710
  2. Olga Romero 2013-02-06

    Closing as fixed. Tested and verified with: Titanium Studio, build: 3.0.2.201302041757 Titanium SDK, build: 3.0.2.v20130201161712 CLI 3.0.24 No error, compiling for mobile web

JSON Source