[MOD-2328] iOS: Refactor Ti.URLSession, allow background uploads
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-05-14T11:38:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Ti.URLSession 2.1.0 |
Components | UrlSession |
Labels | ios, urlsession |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2017-03-08T09:54:37.000+0000 |
Updated | 2018-08-06T17:49:21.000+0000 |
Description
This is an improvements I was working on a few months ago. It allows people to perform background uploads (together with the already existing background download functionality). While working on it, I also deprecated the old API to have a unifies URLSession api that does it's operations on "Session" objects instead of having all methods on the module top level. I also exposed all other possible properties and methods around it, so people can use all the sugar from the NSURLSession API in Titanium.
Thankfully, [~rlustemberg] also did a PR to the core to receive the upload responses from the uploads in [here](https://github.com/appcelerator/titanium_mobile/pull/8860). Together with my module PR [here](https://github.com/appcelerator-modules/ti.urlsession/pull/9), the functionality is completely implemented by now and can be reviewed.
PR (titanium_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/8860 PR (ti.urlsession/master): https://github.com/appcelerator-modules/ti.urlsession/pull/9 Test-Case (deprecated - should still work): https://github.com/appcelerator-modules/ti.urlsession/blob/master/ios/example/app.js Test-Case (new one - should be no deprecation warnings: https://github.com/hansemannn/ti.urlsession/blob/ba8c3075f663787219b68e0de4fc817fddf26f1c/ios/example/app.js
[~ewieber] [~amukherjee] This PR is now labeled for QE-testing.
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.