Best FTP Objective-C wrapper for iPhone

2019-01-24 19:05发布

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

5条回答
We Are One
2楼-- · 2019-01-24 19:28

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

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

查看更多
姐就是有狂的资本
3楼-- · 2019-01-24 19:31

GoldRaccoon isn't mentioned and can be found on GitHub. I use that library and it works very well (besides it didn't support FTP rename)

查看更多
该账号已被封号
4楼-- · 2019-01-24 19:37

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.

查看更多
可以哭但决不认输i
5楼-- · 2019-01-24 19:39

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....

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-01-24 19:46

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.

查看更多
登录 后发表回答