views:

1348

answers:

7

I know you use the C based networking API to do FTP communication but I'd prefer to use something a little higher level. I've seen a few Objective-C based wrappers but I'm not sure what to use. I don't need that complex of FTP interaction. Its just the typical create/delete dirs, upload/download files... What do you recommend?

Edit: Here is one that looks promising but I can't get it to compile for the iPhone SDK The ConnectionKit

+3  A: 

The reason why you can't find much in the way of useful FTP client software is because FTP isn't used much any more and is generally actively discouraged from use.

Without great care, it is quite easy to create big old security holes when using FTP (when I ran a consulting company, the 3 times we had infected machines were all because of FTP server security holes or exploits -- one time, the damned HP copier's FTP server was the attack vector!).

FTP is also inefficient unless carefully configured.

I would encourage you to use an HTTP based protocol. WebDAV allows you to do basically anything FTP can do, but does so over an HTTP channel. Thus, it'll work through proxies and the like. Heck -- HTTP has become so ubiquitous that pretty much everything works with HTTP.

And, of course, there are plenty of good HTTP client APIs built for Objective-C.

Obviously, if FTP is a requirement for your project, this answer won't help you much....

bbum
+3  A: 

This may help, but you may reconsider design for reasons stated by bbum:

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

Corey Floyd
I tried this last night and despite saying it is iPhone compatible, it won't compile for iPhone. It uses some OS X only things.
jamone
S7 Looks good but I also could not get it to compile for iPhone. I will see if I can make it work and will post back my findings. I also agree that one should use HTTP but some clients just want FTP.
mracoker
OK so the latest version of S7FTP will not compile for iPhone at least with my attempts. So i tested the first version before they made it "mac compatible" and it does work with no changes. Here is the URL to download:http://s7ftprequest.googlecode.com/files/s7ftprequest-basic-release.zip
mracoker
A: 

After not finding anything that works well I decided I'd go ahead and follow Apple's tutorial on how to do FTP. It sure is a PITA but at least it does work. I'm defiantly going to support WebDAV in the first revision my app, and eventually perhaps some other transfer methods later on. I think I'm going to consider releasing this open source after I get FTP & WebDAV working good, since there is no reason why you should have to do this much low level work to do such a basic and ambiguous task as FTP these days.

jamone
A: 

Hi,

I've implemented FTP file download and upload, directory create and directory list download through the regular FTP possibilities in the iPhone SDK. Note: you'd be passing the login name and password as part of every FTP request unsecured. Apparently no apparent connection to the FTP server is maintained at the app level, like with a real FTP client app, that I haven't been able to find for iPhone yet. If you're interested in the source code please let me know through e-mail.

M. de Hoogh

M. de Hoogh
Yes I'd be interested in seeing what others have done in this situation. I can't email you or contact you because it shows you as an unregistered user.
jamone
A: 

Quick comment (other than that your yellow FJ looks a lot like mine :-)...

The iPhone compile problem with the latest S7FTP is simply that it uses an unexposed delegate (the NSStreamDelegate). You can just delete that - the runtime will find the selectors for the delegate anyway. Does not cause any problems that I've detected... but there are other bugs in the S7FTP code related to the locking technique (only seems to manifest when an FTP operation fails I think).

Huygir
A: 

Hello All, It looks like I am not the only one trying to integrate ftp on iPhone. After looking at different choices (ASHITTPRequest, diddyFTPServer and SympleFTPSample), S7FTP seems the most suited for doing simple load/updload pics operations using a secure connection (user/password provided).

But I just found your answer above and I am quite concerns now about BUGs. I will do some testing and get back to you with my conclusions.

Any insights would be more than welcome!

magda
A: 

i have also some problem in downloading files from ftp server for iphone which is the best way to access ftp through iphone.. the ftp contains password and username... any one have help.......

thanks in advance

muthiah