[TIMOB-12407] JS Files unreachable on iOS device builds via Ti.Filesystem
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-14T21:00:33.000+0000 |
Affected Version/s | Release 3.0.0, Release 3.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Christian Sullivan |
Assignee | Eric Merriman |
Created | 2013-01-24T02:37:22.000+0000 |
Updated | 2017-06-14T21:00:33.000+0000 |
Description
Unable to retrieve js files in application resources directory.
Also
getDirectoryListing( )
returns files and directories, but is missing js files and directories.
TEST CASE
// execute with a file named tequire.js
in your app resource directory
// Works on Simulator
// Fails on device
try {
var t1 = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory + '/tequire.js').read().text;
} catch (e) { }
// Works on Simulator
// Fails on device
try {
var t2 = Ti.Filesystem.getFile('tequire.js').read().text;
} catch (e) { }
// Fails on Simulator
// Fails on device
try {
var t3 = Ti.Filesystem.getFile('/tequire.js').read().text;
} catch (e) { }
alert('TEST1: '+(t1||'').length+' \nTEST2: '+(t2||'').length+' \nTEST3:' + (t3||'').length);
We might want to do this as a feature request. Access to the js files on device is limited (IE, the files are not actually there, but stored in the binary) for security reasons (limit reverse engineering).
Closing ticket due to the time passed and lack of progress in the past few years. Any further problems, please file a new ticket.