0

The situation: We would like to make an app that shows all files on an iOS Device

The system: iOS App, non jailbroken system

The question:

  • What files (and filetypes) are allowed to be accessed by every app (system-wide) ?

(PS: we won't do file-browser like actions like sub-folders, delete, etc .. )

cocoa coder
  • 214
  • 1
  • 3
  • 15

4 Answers4

2

UPDATE :

what you are trying to achieve is not possible because of the sandbox feature of the apps. though you can display certain file types using below description.

Previously Answered this

If I understand your question correctly, there is already a framework for what you are trying to achieve. It is called the quick look framework and supports these many file types...

A Quick Look preview controller can display previews for the following items:
iWork documents
Microsoft Office documents (Office ‘97 and newer)
Rich Text Format (RTF) documents
PDF files
Images
Text files whose uniform type identifier (UTI) conforms to the public.text type (see Uniform Type Identifiers Reference)
Comma-separated value (csv) files

you can have more info about it here...

Ankit Srivastava
  • 12,347
  • 11
  • 63
  • 115
  • Thanks for the info. So all .docs, photos, videos and .pdf are accessible for every app ? Can the QL also preview music and video files ? – cocoa coder Apr 10 '12 at 16:49
  • NO only the files in the application sandbox and it can only open the files that I have mentioned above... – Ankit Srivastava Apr 10 '12 at 16:56
  • yes videos can be opened system wide as well as images from the photo library using ALAssetLibrary.. – Ankit Srivastava Apr 11 '12 at 15:59
  • yeah. That was what I wanted to know: "which filetypes are accessible system-wide ?". So, just to be clear: that's: music, videos, documents & photos. So we could have an app showing e.g. all files of type "image", right ? Would interaction like delete, etc .. also be possible for these types ? – cocoa coder Apr 11 '12 at 23:33
1

You can't access anything other than your application folder. Your application is sandboxed and for good reasons (privacy, malware, etc...)

Pepe
  • 6,360
  • 5
  • 27
  • 29
1

You can only access files within your application directory. Look here for a full explanation

giorashc
  • 13,691
  • 3
  • 35
  • 71
1

If you don't mean files and just the content of the phone, there are APIs for

Lou Franco
  • 87,846
  • 14
  • 132
  • 192