Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CFNetwork SSLHandshake failed (-9806) error using NSURLSession when app in background for an uploadTask

I am facing a CFNetwork SSL Handshake error while uploading a video file using NSURLSession UploadTask when the App is in background. There is no problem uploading the videos when the app is in foreground. Problem arises only when the app is in background.

like image 583
user2643583 Avatar asked Jan 23 '14 20:01

user2643583


1 Answers

Backgrounded NSURLSession's handle a lot of things differently, including auth. I'd recommend you carefully read everything about background sessions and tasks in Apple's URL Loading System Programming Guide, particularly the section on Background Transfer Considerations.

You might also try see what you get when you set a session delegate which implements the callback:

-[NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler:].

like image 149
Clay Bridges Avatar answered Oct 17 '22 17:10

Clay Bridges