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

十年热恋 提交于 2020-01-21 04:54:11

问题


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.


回答1:


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:].



来源:https://stackoverflow.com/questions/21318200/cfnetwork-sslhandshake-failed-9806-error-using-nsurlsession-when-app-in-backg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!