Skip to main content
Inspiring
June 19, 2013
Question

Can I let users browse the applicationStorageDirectory in iOS?

  • June 19, 2013
  • 1 reply
  • 643 views

I want to use

  • browseForOpen()

in an iOS mobile app authored in Flash CS5.5.Can someone just reassure me that it is possible before I try and work out how to do it....Any code hints welcome!!
Best
Tommy Banana






This topic has been closed for replies.

1 reply

Inspiring
June 19, 2013

Using:

var directory:File = File.applicationStorageDirectory;

var contents:Array = directory.getDirectoryListing(); 

for (var i:uint = 0; i < contents.length; i++) 

                              {

                                  trace(contents.name, contents.size); 

                              }

I can trace out the file names in that directory.

I guess I use the place in the array to set a file name as a target for

fileStream.openAsync

I want to be able to save several small text files in there and let the user decide which one to load.

Ideally by opening an iOS Browser window and letting them select.

Any help appreciated.

Tommy B.

Ollie Edge
Inspiring
June 19, 2013

Hello Tommy,

I don't believe I actually ever seen or heard of an iOS browser window, which leads me to believe they don't exist. Anyway..!

If you want to publish your application on the store when using applicationStorageDirectory, then you will need to abide by the guidelines set by Apple or your app will be rejected, which you can find more about here:

http://blogs.adobe.com/airodynamics/2012/03/05/app-compliance-with-apple-data-storage-guidelines/

------

To "browse" a directory on iOS you would have to create your own file selector, so list the directory, then visually display them on the screen for a user to select.

Hope that helps,

O.

Inspiring
June 19, 2013

Thanks Ollie.

If anyone has a suggestion for a custom File Selector for iOS any help appreciated.

Tommy B.