I got a Error Message When I use NSURLSession
to connect a web Service with a https connection (Xcode 7.1)
the error message is following~
Error Domain=kCFErrorDomainCFNetwork Code=310 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 310.)" UserInfo=0x7fcaf4807260 {_kCFStreamErrorCodeKey=-2096, _kCFStreamErrorDomainKey=4}
But My Code is worked well with "http connection".
I use Safari to connect the web Service and Safari give me a alert like "the Certificate is invalid".
Is my problem (kCFErrorDomainCFNetwork Code=310
....) come from the error SSL Certificate?
and any idea to solve the Problem?
I have set the info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
But no working~~~~
thanks in advance~