• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

All Files Blocked On IOS 8

Explorer ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

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?

TOPICS
Development

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Feb 04, 2015 Feb 04, 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

...

Votes

Translate

Translate
Engaged ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

It most likely worked before because I tested the app on a jailbroken ipod and now I am not. What a bad idea. Thank you for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

Ah wow, yea likely that was the reason it probably worked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

Well what I want to do is go through the camera role and the mutations folder to get photos. Is there absolutely no way for me to get to those files now?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

Not directly by accessing the filesystem, but you might find or start with some ANEs that wrap the AssetsLibrary frameworks for iOS.

For example, this ANE (which has source) that uses those APIs to let you access photos and thumbnails.

rivella50/ANE-CameraRoll · GitHub

You will be limited by whatever Apple allows you to do with ALAssetsLibrary Class Reference if you wanted to expose those functions by extending that ANE or writing your own AIR wrapper

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2015 Feb 04, 2015

Copy link to clipboard

Copied

Sounds difficult but I knew this project wasn't going to be easy. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2015 Apr 08, 2015

Copy link to clipboard

Copied

LATEST

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!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines