0

I want to upload data using REST api and uploadTask of URLSession in background.I search a lot but cannot find examples of this.I have data that is store in local database with different fields such as latitude/longitude ,images etc.Now I want to upload these data fields to server using REST api but I don't know how to use REST api with upload task as I want to upload in background in Swift. I am using this REST api: http://docs.parseplatform.org/rest/guide/

Any help would be appreciated..

naf123
  • 79
  • 2
  • 7
  • here is an example on [github](https://gist.github.com/cmoulton/7ddc3cfabda1facb040a533f637e74b8) _please note it's not my repo_ – zombie Feb 19 '18 at 19:07
  • in this example data task is used and data task does not support background upload.is there is way to used this example with upload task? – naf123 Feb 19 '18 at 19:34
  • does not support background upload????????? network request never happens in the foreground! please google `URLSessionUploadTask` – zombie Feb 19 '18 at 19:43
  • I don't know exactly but i have searched a lot and in different sites i have read in data task upload does not happen in background, it only upload data in foreground. as compare to this in upload task uploading continues even when app goes to background state. – naf123 Feb 19 '18 at 19:53

0 Answers0