2017-11-20 5 views
4

.mjpegビデオフィードを取得するために使用していたサーバに何か変更がありました。TIC TCP Conn Fail

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アラートエラーが発生しているという問題に直面しています。

私がこれまでに発見したすべてのは、Appleのエンジニア(エスキモー)の文です:

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

彼によると、iOS11 Appleは、この動作を引き起こす可能性のあるATSの内部を変更したため。

+1

解決策を教えていただけますか?あなたがそれを見つけるなら、同じ問題に直面しているからです。 –