FTP and iPhone Programming

2019-06-09 21:53发布

问题:

Can someone show me code that takes an image from a server and puts it into an image on the iPhone to display in a program. In particular, let's say my ftp server is at mydomain.com and my username is "name" and password is "password"

What would the code look like to take an image called "hello.png" of size 25x25 sitting on the server and using it in my iPhone app.

Thanks!

回答1:

here is some code I wrote for a phonegap plugin that will download a file and save it locally

http://blog.clearlyinnovative.com/post/1097750723/phonegap-plugin-for-downloading-url



回答2:

Use the NSURLConnection and CFFTPStream APIs.

A good example is here on Apple's site.



标签: iphone ftp