0
votes

I have to develop an AIR app for a client, that reads the video folder content and can play any video in it. It's quite easy with Android, I can read any folder on the phone/tablet, but on iOS it's not that easy. I can't use applicationDirectory because the client wants to put videos himself later in the videos folder on iPad. (But if you have a solution to put files in applicationDirectory with iTunes or else, please share !)

I know there are some ane's that read the cameraroll content, but they display a native pickup screen, while I just need a list of the files.

I tried to use File.documentsDirectory to access content, but got no luck. If you have any idea, thanks in advance !

1
If you have the user's permission to access the files and folders, you should be able to traverse the device filesystem starting with / (the root folder). - Organis
You'll need an ANE to list the video assets from the user's camera roll on iOS. We have this in development with our ANE (airnativeextensions.com/extension/…) but that functionality is not available yet unfortunately. - Michael
Ok thanks, do you know when it will be available ? Btw, there are no user's permissions on iOS, it's only on Android. And I need this to work on iOS. - kek
Ok I find a workaround : in my XML file I added <key>UIFileSharingEnabled</key><true/> to the iPhone infoAdditions, so that I can access to app's documents through iTunes. I add files with iTunes, and I can read the content of the folder in AIR with File.documentsDirectory.getDirectoryListing() Hope it will help someone else ! - kek
@key, consider making an answer for your question to better help future users. You can also accept your own answer. The more details the better. - BadFeelingAboutThis

1 Answers

0
votes

Ok I found a workaround : in my XML application file I added <key>UIFileSharingEnabled</key><true/> to the iPhone infoAdditions, so that I can access to app's documents through iTunes. I add files with iTunes, and I can read the content of the folder in AIR with File.documentsDirectory.getDirectoryListing() Hope it will help someone else !