TheWidlarzGroup/react-native-video

[feature/ios] support self signed https URL

クローズ

#2,776 opened on 2022/07/20

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)Kotlin (3,027 件のフォーク)batch import
6.x.xPlatform: iOSV6featurehelp wanted

Repository metrics

Stars
 (7,677 個のスター)
PR merge metrics
 (平均マージ 2d 3h) (30d で 11 merged PRs)

説明

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

コントリビューターガイド