Hi everyone, I'm looking for a solution to a problem that I've been having recently. Most of our customers in the field are required to upload pictures of the work that they do so as to provide legal cover in case anything bad happens. I want to use an NSUrlSession in conjunction with Background Transfer in order to opportunistically upload these pictures in the background, so as to not get in the way of the user experience. Currently, the user is unable to use the app or progress on their work while pictures upload, which is simply bad user experience. This is why I'm attempting to switch to NSUrlSession.
When looking at the NSUrlSession documentation, it does say that the class "...natively supports...ftp...URL schemes." I haven't had much luck achieving my desired goals, though. This is where it might get tricky for readers of this board, but I'll try and describe the best I can. I'm using Xamarin.iOS, but still using the NSUrlSession class and associated objects. I create an NSUrlSession object with the BackgroundSessionConfiguration and a unique identifier. I then use my NSUrlSession object with the method CreateUploadTask. My request is an NSUrl looking like so: "ftp://myftpUser:myftpPassword@myftpIP:Port/Pictures/Database/2017/10/31" and my file URL looks like so: "file:///var/mobile/Containers/Data/Application/05562862-FAC1-4C09-8477-233498882F32/Documents/PolarisPictures2/VUPSXOUTA722002799CMC5022017103109544681088_1.jpeg"
It is my understanding that using CreateUploadTask with the NSUrlSession task kicks off said task; however, nothing ever happens. So, my fundamental question is: can we upload files to an FTP server with NSUrlSession? And if so, what am I doing incorrectly here? I have no problems posting my C# code, I just figured it would be easier to say what I'm doing instead of possibly confusing readers.
Thanks,
TY