Before iOS 9, I use the CFStream APIs (which are deprecated after iOS 9) to list / download / upload files via FTP.
Now, I have to transfer my program to adapt iOS 9.
How can I download files from FTP via NSURLSessionStreamTask?
Before iOS 9, I use the CFStream APIs (which are deprecated after iOS 9) to list / download / upload files via FTP.
Now, I have to transfer my program to adapt iOS 9.
How can I download files from FTP via NSURLSessionStreamTask?
NSURLSession supports downloading from FTP servers. It does not support uploading, to the best of my knowledge, and it probably does not support retrieving file listings, either. In fact, even its predecessor, NSURLConnection, did not support those things. Support was never added, because FTP has basically been considered deprecated since the mid-1990s.
If your app is primarily an FTP app, keep using the existing API and squelch the deprecation warnings using pragmas.
If your app is any other kind of app, move away from FTP. It is a terrible way to upload content, and should be used only for backwards compatibility with legacy systems that cannot be upgraded to use a more secure protocol like SFTP, WebDAV over HTTPS, POST over HTTPS, WebDAV with digest auth, POST with digest auth, etc.