-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS foreground or background #454
Comments
I observe the same issue as @dineshpote26 Have implemented the background_downloader to upload videos that my app records in background. I am using on iOS18. The app works perfectly fine when the app is open. However, whenever I switch to another app or when phone is locked, the background_downloader stops sending requests to server even though there are many tasks pending in its queue. From what I understand, I may have to write an iOS BGTaskScheduler to keep calling the background_downloader. Is my understanding correct? Appreciate any clarification, guidance, or reference implementations where background_downloader has been used for true background activity in iOS. @781flyingdutchman appreciate if you can look into this and advise. Thanks |
Hi, I think you're using a |
I am using HoldingQueue as shown below: try { The fastest background operations will be when you don't use a separate queue at all. Does this mean I should remove this line? If I’m not using any queue, will maxConcurrent apply to the entire queue automatically ie 100 in queue then 100? |
If your server allows, it is best to not use any maxConcurrent limitation, and let the OS and server negotiate what can be done in parallel. That means no A bit more detail:
Hope this helps. |
Issue:
I am facing an issue with uploading videos to the server. In my queue, there are 100 pending records, and when the app is open, the queue processes them very quickly.
Queue Configuration:
tq.maxConcurrent = 2; // No more than 2 tasks active at any one time
tq.maxConcurrentByHost = 2; // No more than 2 tasks talking to the same host at the same time
tq.maxConcurrentByGroup = 2; // Limit concurrent tasks by group
Problem:
When the app is running in the foreground or background (i.e., when switching to other apps), the queue responds slowly. The requests hit the server after 2–3 minutes, and sometimes it takes up to 5 minutes.
This issue occurs mostly on iOS.
Question:
Are there any suggestions or workarounds to improve the upload performance in the background, especially for iOS?
The text was updated successfully, but these errors were encountered: