Find URL for NSURLSession / NSURLConnection HTTP Upload Error (kCFStreamErrorDomainSSL, -9802)

I get the notorious bug NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)in iOS 9. I don't want to add a global exception, but for certain domains.

How do I know which URL is causing this error?

+4
source share
2 answers

When you call the NSURLConnection or NSURLSessionTask delegate processing method, get the URL from the request object and print it using NSLog (or just put the debug checkpoint in this method).

CFNETWORK_DIAGNOSTICS 1 ( 2 3), (, ).

+4

CFNETWORK_DIAGNOSTICS @dgatwood setenv("CFNETWORK_DIAGNOSTICS", "3", 1);, , main.m. , - , :

2014-10-28 14: 23: 37.115 QTestbed [2626: 60b] CFNetwork, :/private/var/mobile/Applications/76531F40-3291-4565-8C75-0438052C83BC/Library/Logs/CrashReporter/CFNetwork_com.example.apple-samplecode.QTestbed_2626.nwlrb.log

.

Apple Q & A.

+3

Source: https://habr.com/ru/post/1606360/


All Articles