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";
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3709 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3710
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