2017-11-20 9 views
4

.mjpeg 비디오 피드를 가져 오는 데 사용한 서버에 뭔가가 변경되었습니다.TIC TCP 연결 실패

open func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { 

    var credential: URLCredential? 
    var disposition: Foundation.URLSession.AuthChallengeDisposition = .useCredential 
    // Getting the authentication if stream asks it 
    if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { 
     if let trust = challenge.protectionSpace.serverTrust { 
      credential = URLCredential(trust: trust) 
      disposition = .useCredential 
     } 
    } else if let onAuthentication = authenticationHandler { 
     (disposition, credential) = onAuthentication(challenge) 
    } 

    completionHandler(disposition, credential) 
} 

이미 true로 NSAllowsArbitraryLoads을 설정 한 :

<dict> 
    <key>NSAllowsArbitraryLoads</key> 
    <true/> 
</dict> 

TIC TCP Conn Failed [5:0x1d4361380]: 3:-9802 Err(-9802)

TIC TCP Conn Failed [6:0x1c0177a00]: 3:-9800 Err(-9800)

TIC TCP Conn Failed [7:0x1d4361440]: 3:-9800 Err(-9800)

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9800)

Task <2B8346B5-6BB2-4B92-B311-554410CBF92F>.<1> HTTP load failed (error code: -1200 [3:-9800])

Task <2B8346B5-6BB2-4B92-B311-554410CBF92F>.<1> finished with error - code: -1200

이 내가 오류를 받고 있어요 코드는 다음과 같습니다

지금이 오류를 받고 있어요

mjpeg를 얻으려면 MjpegStreamLib 코드를 사용하고 있습니다.

무엇이 잘못 될 수 있습니까?

+0

이 링크가 유용 할 수 있습니다. * Womble * [https://stackoverflow.com/questions/30720813/cfnetwork-sslhandshake-failed-ios-9](https://stackoverflow.com/questions)의 코멘트보기/30720813/cfnetwork-sslhandshake-failed-ios-9) – Paul

답변

0

iOS10에서보고 된 예상 -9825 (TLS 경고 잘못된 클라이언트 인증서) 대신 일반 -9802 TLS 경고 오류가 발생한다는 사실을 직면하고 있습니다.

내가 지금까지 발견 한 모든 애플 엔지니어 (에스키모)의 성명 : 그에 따르면

https://forums.developer.apple.com/thread/80638

, iOS11 애플이 동작이 발생할 수있는 몇 가지 ATS 내부를 변경하십시오.

+1

해결 방법을 알려주시겠습니까? 당신이 그것을 발견한다면, 같은 문제에 직면하고 있기 때문입니다. –