IOSBackgroundTask breaks downloads
See original GitHub issueIs 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:
- Created 5 years ago
- Reactions:3
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same problem.
does anyone know a better library? this one seems poorly-supported.
I am also having same issue.