I want to upload files to an FTP. I would like to use NSURLSession for its backgrounding support. Apple documentation says it is supported but so far I have been unable to find it. The POC I have done is as follows:
The sample code from apple here uses NSStreams which I would like to avoid. On the other hand Apple's URL programming guide here says:
The URL loading system provides support for accessing resources using the following protocols:
So far I have searched through NSURLSessionUploadTask and NSURLSessionDataTask but I have only been able to find HTTP protocols, which will not work for FTP.
Much appreciate any help and thanks in advance.
From the NSURLSession Class Reference
The NSURLSession class and related classes provide an API for downloading content via HTTP.
You can use other library with CFNetwork Framework like WhiteRaccon to upload file to FTP server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With