6

Could anybody explain to me the process of uploading to and downloading form and ftp server with the iPhone SDK. If you could just point me in the right direction (e.g. documentation etc.). How difficult is a task like this?

Thanks in advance.

5 Answers5

3

You can use this. It support all the basic ftp operations:

Download file
Upload file
Delete file
Delete directory
Create directory
List directory contents

[DISCLAIMER] I am the developer of the library, I needed a ftp library too in the past and came over this answer. However, I decided to write one myself because s7ftprequest didn't support at that point several operations that I needed.(like download or list directory)

Rad'Val
  • 8,895
  • 9
  • 62
  • 92
3

Try this Simple FTP Download

Justin
  • 84,773
  • 49
  • 224
  • 367
Ankur
  • 279
  • 1
  • 2
  • 9
2

The Apple documentation will provide far more info in general than I could. Have a look at:

http://developer.apple.com/iphone/library/documentation/Networking/Conceptual/CFNetwork/CFFTPTasks/CFFTPTasks.html#//apple_ref/doc/uid/TP30001132-CH9-SW1

which details the FTP information you need. If you prefer a PDF with all the networking info in it, have a look at:

http://developer.apple.com/iphone/library/documentation/Networking/Conceptual/CFNetwork/CFNetwork.pdf

In this, you'll be particularly interested in Chapter 5. Both detail working with FTP sites, including uploading, downloading, retrieving directory listings, etc.

Paul McCabe
  • 1,554
  • 9
  • 10
2

s7ftprequest only for uploading files to FTP.

The below is sample code from apple

http://developer.apple.com/library/ios/#samplecode/SimpleFTPSample/Introduction/Intro.html

Limitations:

  • FTPS (that is, FTP over TLS)
  • deleting items
  • renaming items
  • other less common FTP commands
  • custom FTP commands
palaniraja
  • 10,432
  • 5
  • 43
  • 76
0

I ended up using GoldRacoon. It turns out that in iOS/objc land, there's BlackRaccoon as the original FTP client lib, then WhiteRaccoon was forked from that, and then GoldRacoon was forked from WhiteRaccoon (I think)

pod search GoldRaccoon

... will show you.

I ended up making a few changes (in my own fork) so that you can pass in a successBlock & failBlock into any request, so that block-y callers (like my classes) don't have extra work to manage the delegate callbacks. Github link (my fork): https://github.com/xaphod/GoldRaccoon

xaphod
  • 6,392
  • 2
  • 37
  • 45