[TIMOB-17058] iOS: Implement NSURLSession Uploading
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-09-12T13:01:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | iOS |
Labels | hyperloop, ios |
Reporter | Matthew Congrove |
Assignee | Eric Merriman |
Created | 2014-06-02T17:18:05.000+0000 |
Updated | 2017-09-12T13:26:24.000+0000 |
Description
Request that the NSURLSession module adds support for the [upload task](https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionUploadTask_class/Reference/Reference.html#//apple_ref/occ/cl/NSURLSessionUploadTask).
FYI - This is high priority for customer. It's a required for a main piece of their app functionality.
I'd like to vote to have this issue with a higher priority as there's no other good method to allow background upload using Titanium.
Hi - I also need this ASAP for a client project. If the priority could be reviewed I'd be grateful without a suitable alternative.
To be implemented with hyperloop, either as a module or direct implementation.
We've been working with @hansemann to enable uploadtasks in ti.urlsession. The current fork from his branch at [https://github.com/hansemannn/ti.urlsession/tree/support-upload] is working perfectly. The only thing that we need to make this module more useful is thet the 'sessioncompleted' event from Ti.App.iOS would also deliver the responseText from the request, otherwise we don't really know if our upload was succesfull or just that the server dispatched our request. I've made some modifications to TiApp.m which deliver the data: [https://gist.github.com/rlustemberg/8dbf4e36a95fcb92dd0a500f508c2fa6] (I had to paste a gist link, the formatting here was hideous) I think the importance of uploadtasks justifies doing deep surgery at this level, but I hope you guys can find a better way. If you are ok with this I can create a PR
Resolving as
Fixed
- this was added in Ti.URLSession in 2.1.0 which is pre-packaged with SDK 6.1.0 and later.Aren't we still missing response handling for the upload tasks? I couldn't find the code from my PR.