Closed ManjitBedi closed 3 years ago
Hi @ManjitBedi,
That's one of the missing features in Networking, doesn't handle background uploads as it should. I tried to make it work but it's been a while since I tried.
Thanks for the reply.
I see; yes, it is a bit of work to do support background uploads; I am currently doing my own implementation specific to the application that I am working on.
That should work well! Take care :)
Hello, I am currently trying out the library.
On the project, I am working on we have a need to do uploads of images in the background. I have the code working using a form post with the image data.
However, if I set the configuration to background, e.g:
let networking = Networking(baseURL: urlString, configuration: .background(withIdentifier: "com.appname"))
The app will throw an exception at run-time because of the completion block, as completion blocks are not permitted with background tasks:
networking.post(Api.backlogSync.rawValue, parts: parts) { result in
Do I need to create a new post method without a completion block? Or can you recommend another approach?