ios - What happen to http request when applicationWillResignActive or applicationDidEnterBackground -
when app doing http request , user receive phone call , put app in background (so event applicationwillresignactive
, applicationdidenterbackground
fired), what's happen current active http request ? need worry (calling example beginbackgroundtaskwithexpirationhandler
) or system @ least let current http request finish ?
assuming didn't opt-in multitasking, http call continue a while: according docs on applicationdidenterbackground, have 5 seconds complete ongoing tasks, hence unfinished http calls halt when actual suspension occurs. respective sockets timeout.
if need more time, use background downloads or begin background task.
Comments
Post a Comment