CFNetwork的SSLHandshake使用NSURLSession失败(

编程入门 行业动态 更新时间:2024-10-12 01:28:44
本文介绍了CFNetwork的SSLHandshake使用NSURLSession失败(-9806)错误,当应用程序在后台为uploadTask的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我现在面临一个CFNetwork的SSL握手错误上载使用NSURLSession 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.

推荐答案

后台运行 NSURLSession 的处理很多不同的事情,包括身份验证。我建议你​​仔细阅读有关苹果的背景会话和任务的一切网址加载系统编程指南,尤其是在后台传输注意事项栏目

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

更多推荐

CFNetwork的SSLHandshake使用NSURLSession失败(

本文发布于:2023-10-10 21:25:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1479791.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:CFNetwork   SSLHandshake   NSURLSession

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!