http icon indicating copy to clipboard operation
http copied to clipboard

Request handling when the internet is choppy and the app goes in background

Open Ubaid81 opened this issue 1 year ago • 1 comments

If we made an API request and the application goes into the background while the response get more than 30 sec then we got an exception and the code only execute after we resume the app, however if the response comes in 30 sec then code execute in the background itself.

This only happens when the response time is high and the internet is choppy.

The timeout is set at 255 sec.

Ubaid81 avatar Jan 23 '24 04:01 Ubaid81

Did you try declaring background modes for your application: https://developer.apple.com/documentation/foundation/url_loading_system/downloading_files_in_the_background?language=objc

Maybe "fetch" would help?

brianquinlan avatar Jan 23 '24 16:01 brianquinlan