TheWidlarzGroup/react-native-video

[feature/ios] support self signed https URL

已关闭

#2,776 创建于 2022年7月20日

 (2 条评论) (0 个反应) (0 位负责人)Kotlin (3,027 个派生)batch import
6.x.xPlatform: iOSV6featurehelp wanted

仓库指标

星标
 (7,677 个星标)
PR 合并指标
 (平均合并 2天 3小时) (30 天内合并 11 个 PR)

描述

When I what to play a video asset stored in self signed certificate server via iOS, it shows error as "The certificate for this server is invalid.". Is there any way to ignore certificate validation? When request data from self signed cert server with NSURLSession, I can ignore cert validation using following code

- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler {
    NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
    completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
}

How can I do this in this component? as this issue #2649

贡献者指南