7

I noticed that there is software (such as iExplorer) that allows you to access files on an iPhone-device from your Mac.

Now my question is: How can I access iPhone files via Objective-c?

This is only for educational purposes.

I found this: https://github.com/Chronic-Dev/libirecovery but I'm not sure if I'm on the right track.

gniourf_gniourf
  • 44,650
  • 9
  • 93
  • 104
fntlnz
  • 411
  • 2
  • 6
  • 14
  • 3
    good question. Just because its against the Terms of Service does not make it illegal. And just because its not allowed does not mean people dont want to know. Ill see what I can find. +1 for a good educational project. – The Lazy Coder Jan 01 '13 at 22:20
  • Out of interest, which Terms of Service forbid this? –  Jan 25 '13 at 09:17

3 Answers3

7

So it seems that you're looking for an API which makes it possible to access the filesystem of the iPhone from a computer. Well, this API exists, and it's called the MobileDevice framework.

  • Thanks for the tip, do you think that the tristero's https://bitbucket.org/tristero/mobiledeviceaccess/src is a good approach for MobileDevice framework? – fntlnz Jan 01 '13 at 23:49
0

Unfortunately, there's no easy or legal way to access files on your iPhone, especially through Objective-C.
The applications installed on iOS are sandboxed, which means they can only access files in their own directory tree; they have no access/knowledge of other files.
Like you said, you can access files using software like iExplorer, but not programmatically from the iPhone itself.

Alex Bardasu
  • 348
  • 1
  • 8
  • 5
    Terms of Service violation does not equate to Illegal. Learn your rights before you spread bad information. – The Lazy Coder Jan 01 '13 at 22:21
  • I'm sorry, I misspoke. That's what I meant. And my point was that there really is no way to access your iOS files freely without jailbreaking. – Alex Bardasu Jan 01 '13 at 22:50
  • Perhaps not all the files. but even the Jailed ios devices let you access things via usb on the computer you are connected to. Check out iExplorer. It allows you to view and download anything the device lets you access. And if your device is jailbroken it lets you access All the information and files. – The Lazy Coder Jan 01 '13 at 23:01
  • @TheLazyCoder How to achieve file explorer in ios app, I mean for browsing. Pdf files were stored to documents directory and I want to fetch them, in fact, it should be a replica of "Choose file" functionality as that of android. Please help me, thanks :) – Eshwar Chaitanya Dec 16 '14 at 08:00
  • I believe you are looking for something along the lines of a file enumeration. Specifically in the Documents directory of your app. Which is allowed. Here is another question addressing this problem. http://stackoverflow.com/questions/6398937/getting-a-list-of-files-in-the-resources-folder-ios – The Lazy Coder Dec 16 '14 at 22:10
0

Here is an old project to browse the iphone. You may be able to get some pointers from it on building an application to do the same with the latest info.

http://code.google.com/p/iphonelist/

Couple that with carbonic acid's post about the Mobile Device Framework and you should be able to do some good stuff.

if I find more unique info ill post it here.

The Lazy Coder
  • 11,560
  • 4
  • 51
  • 69