0

I got an error log in my console CFNetwork SSLHandshake failed (-9806) by xCode.

How can I figure out which request is responsible for the failed log.

There are many requests both third party and my own server request when my app launched. I can not figure out which one having error.

Log console only gives me CFNetwork SSLHandshake failed (-9806)

ps: I'm using swift 3.0, Xcode 8. AFNetworking 3.0(seems request by AFNetworking don't have error, cause I use AFNetworking logger to log all request by AFNetworking )

when testing, iOS 8 and iOS 9 seems like make more failed logs than iOS 10.

ps: I have add NSAllowsArbitraryLoads to my plist file, And many of my https and http requests have load successfully.

llch
  • 129
  • 1
  • 3
  • 10

2 Answers2

0

I think you have not added following in info.plist

<key>NSAppTransportSecurity</key>
   <dict>
       <!--Connect to anything (this is probably BAD)-->
       <key>NSAllowsArbitraryLoads</key>
       <true/>
   </dict>

If not added, then please add this, so that you will not get this error.

Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81
0
setenv("CFNETWORK_DIAGNOSTICS", "3", 0)

will help log more details

reference here

Burp Suite also gives some help, seems easier than wireshark. reference

llch
  • 129
  • 1
  • 3
  • 10