views:

71

answers:

2

i am new to iphone.. i want guidelines for accessing ftp server through objective c ,where ftp url, username,password should be given in program itself , i want to access a lot of image files from the ftp and display it in my imageview.

how to store those image files in locally and retrieve whenever needed....

thanks in advance..

+2  A: 

Ftp? Really? With username and password? Unless your server is really well configured, FTP is a security hole waiting to happen.

But... OK... to answer your question; there is no built in FTP client API in iOS. You'll either need to roll your own (hard, but the protocol is well documented) or use a client library (maybe easy, maybe not).

I'd start here (yes, a google search, but not meant to be flippant) and review the various libraries to see which fits your needs better.

Note that Omni's frameworks show up on that page. They write good code.


However, the best solution would be to use HTTP to communicate between your app and a server. HTTP support is built in, HTTP is ubiquitous, and it is much easier to configure a web server to be secure.

bbum
thanks for ur help. i am new to this.. so only i cant get a way to solve this problem .
muthiah
It is a very hard problem, especially for someone new. FTP has largely been avoided by the industry because it is such a big security hole. HTTP won, is ubiquitous, and there are plenty of examples of using HTTP to solve problems like this.
bbum
Thank you, I tried my level best. Here my colleagues are also new to iphone .Kindly share your knowledge based on the ftp connection for downloading.
muthiah
That is the grand sum total; "Don't use FTP". The last time I used FTP was in 1998 because a client demanded it. Their server was promptly hacked (they maintained it) and they went out of business.
bbum
A: 

I completely agree with bbum, however there is FTP support in iOS, and even sample code:

http://developer.apple.com/library/ios/#samplecode/SimpleFTPSample/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40009243

but don't use it. use HTTPS.

tullera