question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IOSBackgroundTask breaks downloads

See original GitHub issue

Is there anything else I need to do in order to get background tasks working on iOS, there’s not really any documentation?

Downloading files works as expected without this option however fails to work if I set IOSBackgroundTask: true.

  • please provide the version of installed library and RN project. “react-native”: “0.55.4”, “react-native-fetch-blob”: “^0.10.8”,

  • a sample code snippet/repository is very helpful to spotting the problem.

   return RNFetchBlob
            .config({
                IOSBackgroundTask: true, //onProgress called if this is false
                path: toFile,
                overwrite: true,
                indicator: true,
            })
            .fetch('GET', fromUrl, {
                //some headers ..
            })
            .progress((written) => onProgress(_path,written))
            .then((res) => {
                API.log(`Downloaded ${fromUrl} to ${toFile}`)
            }).catch((err) => {
                API.log(`Error downloading ${fromUrl} to ${toFile}`, err)
                return err;
            })

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

4reactions
jpodprocommented, Jun 28, 2019

same problem.

does anyone know a better library? this one seems poorly-supported.

0reactions
kp72-devcommented, Nov 19, 2020

I am also having same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downloading Files in the Background - Apple Developer
If your app is in the background, the system may suspend your app while the download is performed in another process. In this...
Read more >
Downloading Large Files for iOS No Longer a Nightmare | ICS
When a user requests a background download, iOS spawns a separate process that does only this — downloads the file in the background....
Read more >
Modern Backgrounds Tasks in iOS 13 - Andy Ibanez
BackgroundTasks is a new framework for scheduling background work. Along with it, we get a new background mode for our apps. And to...
Read more >
iOS background processing - Background App Refresh Task
Unlike Android, iOS has restrictions for the use of background processing in an attempt of improving battery life and user experience.
Read more >
how can i track download progress after app is did become ...
Everything is works fine and progress tracked well. But when i go to the background and return back to app, state is still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found