Resources Directory in IOS6?

You must Login before you can answer or comment on any questions.

Hey developers,

I am checking if a file exists in my resources directory, if it does exist I include it. In my simulator this always worked fine and it still does. But since a few days (ios6) it doesn't work on my iPad anymore. When I alert myFile.exists() it says 1 in my simulator but 0 on my iPad..

var myFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'fileName');
 
if(myFile.exists())
{
    Ti.include('fileName');
}
Does anyone know why this is happening?

Kind regards, Niels

2 Answers

I just alerted this piece of script:

alert(Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory).getDirectoryListing());

This alerts the contents of my resources directory, in my simulator it does show the .js files but in my iPad it doesnt.. Seems ios6 can't recognize .js files?

I made a 'work around' for this, but it still won't recognize .js files. So if anyone knows why this is I would like to know :)

Your Answer

Think you can help? Login to answer this question!