Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1177] iOS: Device resource folder not working in simulator

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-01-03T15:14:26.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.8.0
ComponentsiOS
Labelsmodule_filesystem, qe-testadded
ReporterJustin
AssigneeReggie Seagraves
Created2011-04-15T02:45:56.000+0000
Updated2012-01-03T15:14:26.000+0000

Description

Using 1.3.1, resources contained in the device specific directory do not copy to the resources folder. However, they do when deployed to the actual device.

For example, for 'logo.png' in the iphone directory: when launched in the simulator, it fails to load, but when launched on the device, it is successful.

Comments

  1. Stephen Tramer 2011-04-15

    Could also be an Android issue; going to have to check it out.

  2. Eduardo Gomez 2011-07-19

    Problem

    This issue is still present on TiStudio 1.7.1. Every time is attempted to run this on the simulator crashed. It works fine on 1.6.2.

    Environment

    {noformat} Product: Mobile Titanium SDK: Mobile 1.7.1 Platform OS: iOS Platform OS Version: SDK 4.2 {noformat}

    GIT hash SDK Version

    https://gist.github.com/1093847

    Repro sequence

       // this sets the background color of the master UIView (when there are no windows/tab groups on it)
       Titanium.UI.setBackgroundColor('#000');
       
       // create tab group
       var tabGroup = Titanium.UI.createTabGroup();
       
       var sText1, sText2;
       
       var resources = Titanium.Filesystem.resourcesDirectory;
       
       if (Titanium.Platform.name == 'iPhone OS') {
       	resources = '/';
       }
       Titanium.include(resources + 'myinc.js');
       
       
       //
       // create base UI tab and root window
       //
       var win1 = Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
       var tab1 = Titanium.UI.createTab({  
           icon:'KS_nav_views.png',
           title:'Tab 1',
           window:win1
       });
       
       var label1 = Titanium.UI.createLabel({
       	color:'#999',
       	text:sText1,
       	font:{fontSize:20,fontFamily:'Helvetica Neue'},
       	textAlign:'center',
       	width:'auto'
       });
       
       win1.add(label1);
       
       //
       // create controls tab and root window
       //
       var win2 = Titanium.UI.createWindow({  
           title:'Tab 2',
           backgroundColor:'#fff'
       });
       var tab2 = Titanium.UI.createTab({  
           icon:'KS_nav_ui.png',
           title:'Tab 2',
           window:win2
       });
       
       var label2 = Titanium.UI.createLabel({
       	color:'#999',
       	text:sText2,
       	font:{fontSize:20,fontFamily:'Helvetica Neue'},
       	textAlign:'center',
       	width:'auto'
       });
       
       win2.add(label2);
       
       
       
       //
       //  add tabs
       //
       tabGroup.addTab(tab1);  
       tabGroup.addTab(tab2);  
       
       
       // open tab group
       tabGroup.open();
       

    Under resources/iphone

       sText1 = 'I am Window 1 on iPhone';
       sText2 = 'I am Window 2 on iPhone';
       

    Under resources/android folder

       sText1 = 'I am Window 1 on android';
       sText2 = 'I am Window 2 on android';
       

    Associated HD Ticket

    http://appc.me/c/APP-174839
  3. Dustin Hyde 2011-10-27

    Bug: Valid, occurs in: TiMOB: 1.7.4.v20111025165811 Studio: 1.0.6.201110251616 OS: OSX 10.7.2 Lion Devices tested on: iPhone Simulator 5.0, iPad Simulator 5.0 Note: This bug is limited to the simulator in 1.7.4. Bug does NOT occur in: TiMOB: 1.8.0.v20111026114214 Devices tested on: iPhone 5.0 iPod 4.3.5 iPad 4.3.5 iPhone Simulator 5.0 iPad Simulator 5.0 Bug does NOT occur in: TiMOB: 1.7.4.v20111025165811 Devices tested on: iPhone 5.0 iPod 4.3.5 iPad 4.3.5 iPhone 3.1.2
  4. Reggie Seagraves 2011-10-27

    Fixed by one of Blain's previous checkins.
  5. Eric Merriman 2011-12-06

    Verified no longer occurs with SDK 1.8.0.1.v20111205164258 in iPad simulator (4.3.2, 5.0) and iPhone simulator (4.3.2, 5.0) with Titanium Studio, build: 1.0.7.201112052104
  6. Michael Pettiford 2012-01-03

    Reopening to add module filesystem label

JSON Source