rn-fetch-blob icon indicating copy to clipboard operation
rn-fetch-blob copied to clipboard

IOSBackgroundTask breaks downloads

Open kyle-ssg opened this issue 6 years ago • 6 comments

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;
            })

kyle-ssg avatar Jul 12 '18 10:07 kyle-ssg

the exactly same thing is happening with me

vbspace avatar Dec 12 '18 02:12 vbspace

Same here too. With IOSBackgroundTask: true or without, if app go to background the download stops. However, background download works well on Android.

PierreBresson avatar Jan 27 '19 11:01 PierreBresson

Same problem like @PierreBresson

jon-moreira avatar May 02 '19 14:05 jon-moreira

same problem.

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

jpodpro avatar Jun 28 '19 06:06 jpodpro

I am also having same issue.

kp72-dev avatar Nov 19 '20 12:11 kp72-dev

any solution or other library?

fukemy avatar Nov 30 '23 03:11 fukemy