Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-12279

MobileWeb: JS files are not copied over if you put them in the mobileweb directory

    Details

      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";
      

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              mpmiranda Mauro Parra-Miranda
              Reviewer:
              Bryan Hughes
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-15313
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration