Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17058] iOS: Implement NSURLSession Uploading

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-09-12T13:01:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.0
ComponentsiOS
Labelshyperloop, ios
ReporterMatthew Congrove
AssigneeEric Merriman
Created2014-06-02T17:18:05.000+0000
Updated2017-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).

Comments

  1. Matthew Congrove 2014-06-03

    FYI - This is high priority for customer. It's a required for a main piece of their app functionality.
  2. Daniel Kunzler 2015-07-02

    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.
  3. Rolf Dalhaug 2015-07-17

    Hi - I also need this ASAP for a client project. If the priority could be reviewed I'd be grateful without a suitable alternative.
  4. Chee Kiat Ng 2016-03-24

    To be implemented with hyperloop, either as a module or direct implementation.
  5. Richard Lustemberg 2017-03-02

    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
  6. Hans Knöchel 2017-09-12

    Resolving as Fixed - this was added in Ti.URLSession in 2.1.0 which is pre-packaged with SDK 6.1.0 and later.
  7. Richard Lustemberg 2017-09-12

    Aren't we still missing response handling for the upload tasks? I couldn't find the code from my PR.

JSON Source