http
http copied to clipboard
Request handling when the internet is choppy and the app goes in background
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.
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?