Discussion in 'iOS Development' started by raziiq, Aug 24, 2009.
how can i copy a file/folder from iPhone to my Mac desktop?
For OS X use Cyberduck
i m talking about how can i copy folder from iPhone to Mac programmatically, using xcode?
now that is a question i would liked to be solved too but i think you cant !!! because people would change a few things in a app and then resale which will bring the app store to complete and utter MESS
if you want to write a program to transfer files like that, you're going to have to have your application host a web server, or have it use bonjour.
CyberDuck, WinSCP, etc are able to do this because they are SSH clients. They communicate with an SSH server on the device. Sepcifically, you'll want to look into SCP.
All you will have to do, from your mac is issue the appropriate commands into Terminal and you will have the file/s that you want.
Alternately, you can create an application for the iPhone that is a webserver that supports file system access and the proper handling and zipping of files. You would then log into the web server using just a regular internet browser.
Another option would be to create two applications. One for the Mac, and one for your phone. These applications must be able to communicate to each other using Bonjour.
Another option, and this would require a jailbroken phone, would be to install NetaSpeak (or NetaTalk, I forget it's exact name, as I alawys install it and use it, and never think about the name again) on the phone. This implements the AFP protocol, allowing Finder to see your phone and all its contents. You would file transfer how you would any other file from any other location.
Your best bet, in my opinion, is to just use any one of the methods that are already available. All these, to my knowledge, have already been done.
That netaSpeak method seems fine to me but then how can i implement this using xcode? Do i need to import some frameworks from NetaSpeak in my app?
...and you picked the wrong one.
Ideally, you do not want to assume that your user has an application, nor require another application as a dependency.
You should go with either bonjour or scp.
SCP man page: http://www.stat.duke.edu/comp/security/scp_man.html
Separate names with a comma.