Skip to main content
Known Participant
February 4, 2015
Answered

All Files Blocked On IOS 8

  • February 4, 2015
  • 2 replies
  • 1499 views

By using the File class I was able to create, delete, and move files before IOS 8 and now I can't. When I trying to do anything outside the applicationStorageDirectory I get an error File Access denied. Is adobe going to fix this, or do I have to fix this manually,  or is this now impossible?

This topic has been closed for replies.
Correct answer jadams602

In that specific example, that folder is not even within your app's sandbox. Even native iOS APIs don't expose direct file i/o outside your app's folders.

That specific media looks like something you would have to control through things like the native AssetsLibrary APIs etc, that AIR doesn't expose unless you look for an ANE out there that supports bridging to the AssetsLibrary framework.

Just because iExplorer is able to show you those files doesn't mean direct file access is supported. If this actually ever worked in past iOS versions that probably wasn't intended.

2 replies

unutoiul74955614
Participant
April 8, 2015

The file exist at

/private/var/mobile/Containers/Bundle/Application/9C963F35-4065-4A3D-B7CA-C69FE101B8AB/Slide Words.app/json/purchase.json

but when I am trying to write/read is saying permission deny...any other path like

var _file :Filenew File(File.applicationStorageDirectory.resolvePath(t_sUrl).nativePath);

the file doesn't exist on the device...

WHEN ADOBE will resolve this problem? is URGENT!!

jadams602
Inspiring
February 4, 2015

Can you show some code of exactly what paths you were previously using to read/write files?

It sounds like you might have been making assumptions about the location of certain readable/writable folders in your app's sandbox.

In iOS 8 some of these folders have changed location by Apple on purpose so some of your assumed locations are probably failing or non-existent.

If you are doing all your File I/O paths using the aliases like:

  • File.applicationStorageDirectory—a storage directory unique to each installed AIR application
  • File.documentsDirectory—the user's documents directory
  • File.cacheDirectory

...

Nothing should be breaking when the app runs in iOS 8 or previous versions.

Known Participant
February 4, 2015

Well lets say I wanted to just delete a photo from a specific file location, or prehaps copy that image. Such like /var/mobile/Media/PhotoData/Mutations/DCIM/APPLE100/IMG_0099. In this case I would use the code:

var file:File = new File();

file.nativePath = "/var/mobile/Media/PhotoData/Mutations/DCIM/APPLE100/IMG_0099";

file.deleteDirectory();

I know the directory is the because I can see it in iExplorer but I am denied access to the file. But I see what you are saying. Which one would I use to get to the path I am trying to find?

jadams602
jadams602Correct answer
Inspiring
February 4, 2015

In that specific example, that folder is not even within your app's sandbox. Even native iOS APIs don't expose direct file i/o outside your app's folders.

That specific media looks like something you would have to control through things like the native AssetsLibrary APIs etc, that AIR doesn't expose unless you look for an ANE out there that supports bridging to the AssetsLibrary framework.

Just because iExplorer is able to show you those files doesn't mean direct file access is supported. If this actually ever worked in past iOS versions that probably wasn't intended.