[TIMOB-1177] iOS: Device resource folder not working in simulator
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-01-03T15:14:26.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 1.8.0 |
| Components | iOS |
| Labels | module_filesystem, qe-testadded |
| Reporter | Justin |
| Assignee | Reggie Seagraves |
| Created | 2011-04-15T02:45:56.000+0000 |
| Updated | 2012-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.
Could also be an Android issue; going to have to check it out.
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/1093847Repro 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
Under resources/android folder
Associated HD Ticket
http://appc.me/c/APP-174839Bug: 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
Fixed by one of Blain's previous checkins.
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
Reopening to add module filesystem label