I want to write a cocoa application which downloads a file using ftp. I read about the NSURL class which has "NSURLHandle FTP Property Keys". I want to know how do I make use of these constants to provide username and password to the ftp site.
+1
A:
Have you tried inserting the username and password in the URL? Like:
ftp://user:[email protected]/path/to/file
If not you'll probably find what you need in the documentation.
csl
2008-12-29 10:13:31
+3
A:
NSURLHandle is deprecated and has been for a while. Please use NSURLConnection or NSURLDownload instead. Either create one of these objects with a URL like this:
ftp://user:[email protected]/foo/bar.zip
Or, implement the authentication delegate method and pass in a standard URL:
ftp://ftp.example.com/foo/bar.zip
If you need to do anything more complicated than downloading a file, I suggest you look at ConnectionKit which provides full FTP connection support.
Mike Abdullah
2008-12-29 13:13:47