1.urlsession https

- (void)URLSession:(NSURLSession *)session
didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
{
//AFNetworking中的处理方式
NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;
__block NSURLCredential *credential = nil;
//判断服务器返回的证书是否是服务器信任的
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
/*disposition:如何处理证书
NSURLSessionAuthChallengePerformDefaultHandling:默认方式处理
NSURLSessionAuthChallengeUseCredential:使用指定的证书 NSURLSessionAuthChallengeCancelAuthenticationChallenge:取消请求
*/
if (credential) {
disposition = NSURLSessionAuthChallengeUseCredential;
} else {
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
}
} else {
disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;
}
//安装证书
if (completionHandler) {
completionHandler(disposition, credential);
}
}

https://www.jianshu.com/p/4b5d2d47833d

2.avplayer cache

https://github.com/XTShow/XTAudioPlayer/

https://www.jianshu.com/p/c157476474f1

https://github.com/newyjp/JPVideoPlayer

第26月第28天 avplayer cache的更多相关文章

  1. 第27月第28天 iOS bundle

    1. 7.如果将自己打包的bundle给别人使用,别人在打包上传过程中可能会遇到错误提示如: ERROR ITMS-90171: "Invalid Bundle Structure - Th ...

  2. 第26月第30天 srt

    1. ffmpeg -i 0.mp4 -vf subtitles=0.srt 1.mp4 https://jingyan.baidu.com/article/c45ad29c73cef2051653e ...

  3. 第26月第29天 ffmpeg yasm

    1. brew install automake fdk-aac git lame libass libtool libvorbis libvpx \ opus sdl shtool texi2htm ...

  4. 第26月第26天 Domain=AVFoundationErrorDomain Code=-11850

    1. curl -voa http://119.29.108.104:8080/inweb01/kotlin.mp4 -H "Range:bytes=0-1" https://al ...

  5. 第26月第25天 ubuntu openjdk-8-jdk jretty

    1.ubuntu ============== sudo apt-get install openjdk-8-jdk https://blog.csdn.net/zhaohaiyitian88/art ...

  6. 第26月第23天 nsobject 单例 CFAbsoluteTimeGetCurrent

    1.nsobject 单例 sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/ ...

  7. 第26月第22天 iOS瘦身之armv7 armv7s arm64选用 iOS crash

    1.iOS瘦身之armv7 armv7s arm64选用 机器对指令集的支持是向下兼容的,因此armv7的指令集是可以运行在iphone5S以上的,只是效率没那么高而已~ 但是由于苹果要求必须支持ar ...

  8. 第26月第20天 springboot

    --------------------- 1.pom.xml中添加支持web的模块: <dependency> <groupId>org.springframework.bo ...

  9. 第26月第18天 mybatis_spring_mvc

    1. applicationContext.xml  配置文件里最主要的配置: <?xml version="1.0" encoding="utf-8"? ...

随机推荐

  1. jenkins系列之添加全局配置(一)

    第一步: 第二步:执行以下命令: 第三步:找到/c/Users/Administrator/.ssh 目录,里面有两个文件:id_rsa和id_rsa.pub 第四步:配置ssh[这里是id_rsa. ...

  2. 第四篇-以ConstraintLayout进行Android界面设计

    此文章基于第三篇. 一.新建一个layout.xml文件,创建方法不再赘述,在Design界面右击LinearLayout,点击Convert LinearLayout to ConstraintLa ...

  3. maven pom添加本地jar,不提交私库

    <dependency> <groupId>taobao-sdk</groupId> <artifactId>taobaosdk</artifac ...

  4. diff和patch

    diff -u:the unified format会将不同的地方放在一起,紧凑易读 . diff original.txt updated.txt c表示在original文件中的m,n行的内容将要 ...

  5. Luogu P4197 Peaks

    题目链接 \(Click\) \(Here\) 做法:\(Kruskal\)重构树上跑主席树 构造方法:把每条边拆出来成一个点,点权是原先的边权.每次连边的时候,连的不再是点,而是其原先点所在的联通块 ...

  6. Vue(基础七)_webpack打包工具用法(上)

    一.前言 1.webpack原理 二.主要内容 1.webpack原理: (1)官网图:我们的项目有多个js, css文件的时候还需要考虑先引入哪一个后引入哪一个,因为这些js文件是相互依赖的,web ...

  7. Grunt安装与环境配置

    公司项目还没有前后端分离,而前端是使用node.js搭建起来的,现在需要自己动手开发,故学习下并做为记录防止以后忘记. grunt依赖node.js,所以在安装之前确保你安装了 Node.js.然后开 ...

  8. qml: QtCharts模块的使用(基本配置)------<一>

    QtCharts模块可以用于绘制图表: 导入模块: import QtCharts 2.2 例子: import QtQuick 2.0 import QtCharts 2.2 ChartView { ...

  9. 将本地项目上传至github

    1.新建仓库:用于存放要上传的项目(尽量不要添加README). 2.找到要上传的文件夹A,右键点击git bash here,打开git界面 3.在命令行中,输入“git init”,使文件夹A加入 ...

  10. python机器学习-sklearn挖掘乳腺癌细胞(三)

    python机器学习-sklearn挖掘乳腺癌细胞( 博主亲自录制) 网易云观看地址 https://study.163.com/course/introduction.htm?courseId=10 ...