Skip to main content
Participating Frequently
January 10, 2013
Question

access a folder on Ipad

  • January 10, 2013
  • 3 replies
  • 513 views

hi aima developing a software for both android and Ipads

when working with android it works like charm i can create the folders that i want using any file brawser on andoid

so i use this location to save the database "/mnt/sdcard/MyApp/MyApp.db" and i can access it from the code and everything works like charm

but on Ipads its not working i dont want the database to be near the application i want it in a specifuc place in "MyApp" folder

can anyone tell me what to do or how to do it -also i save pictures in that folder so i need a way to have the path

thanx in advanced

This topic has been closed for replies.

3 replies

January 11, 2013

There are some standard directories like File.applicationStorageDirectory which can be used for saving files.

On iOS, you cannot access files using absolute path. You may use the resolvePath() method for accessing files. For example,

     File.applicationStorageDirectory.resolvePath("abc.txt");

will return a File object poinitng to the file abc.txt in the ApplicationStorageDirectory of iOS.

You can find details on these here

Participating Frequently
January 13, 2013

on android if i put

img.source="\mnt\MyApp\x.png" its works fine but on ios it wont canu help me

January 14, 2013

Absolute paths don't work on iOS.

Also, on iOS, an app is only allowed to access data which resides in the app's app folder.