{ "id": "166412", "key": "TIMOB-24452", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-07-11T16:48:51.000+0000", "created": "2017-03-03T13:11:49.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "networking" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-10-23T09:53:46.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Version 2.1.0 of ti.urlsession has support for NSURLSessionUploadTask.\r\nOnce the NSURLRequest is completed, the `sessioncompleted` event is fired with a success status, because the request received it's response. \r\nHowever, the response might have been a 401,still a success code would be set, because NSURLSessionUploadTask does not care for HTTP error statuses.\r\nWe might also want to handle the response code after the upload task is completed.\r\nTo do this we only need to add a delegate method from `NSURLSessionDataDelegate` and modify the sessioncompleted delegate. \r\nI will make a PR with the required changes, which are adding:\r\n\r\n{code:java}\r\n-(void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data\r\n{code}\r\n\r\n and modify this other delegate method:\r\n{code:java}\r\n-(void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Handling responses from Ti.URLSession UploadTask API in the SDK", "creator": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS sdk 6.x.x and below", "comment": { "comments": [ { "id": "408841", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please create the PR and assign here. Moving to TIBOB.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-03-03T14:20:37.000+0000", "updated": "2017-03-03T14:20:37.000+0000" }, { "id": "408842", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "I've renamed my branch to this Jira ticket and made the PR again. Do we need to apply again to have rights to create TIMOB tickets?", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-03T14:22:14.000+0000", "updated": "2017-03-03T14:32:07.000+0000" }, { "id": "409806", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Marking as Duplicate of MOD-2328 to centralize the communication.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T09:55:20.000+0000", "updated": "2017-03-08T09:55:20.000+0000" }, { "id": "415072", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate and links to the related ticket has been provided above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:01:21.000+0000", "updated": "2017-03-22T22:01:21.000+0000" }, { "id": "438801", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening since the other one was module-focussed and this one is SDK focussed. Assigning for our next release!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-06-28T07:25:55.000+0000", "updated": "2018-06-28T07:25:55.000+0000" }, { "id": "438802", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8860", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-06-28T07:27:48.000+0000", "updated": "2018-06-28T07:27:48.000+0000" }, { "id": "439113", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Follow-up PR to fix the type warnings that only occurred after integrating into master: https://github.com/appcelerator/titanium_mobile/pull/10168", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-11T02:46:57.000+0000", "updated": "2018-07-11T02:46:57.000+0000" }, { "id": "442864", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix in SDK version {{7.5.0.v20181018133006}}.\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.0.201808080937\r\niPhone 6 Sim (iOS 12)\r\nAPPC CLI: 7.0.6\r\nOperating System Name: Mac OS Mojave\r\nOperating System Version: 10.14\r\nNode.js Version: 8.9.1\r\nXcode 10.0{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-23T09:53:14.000+0000", "updated": "2018-10-23T09:53:14.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }