My project is running on Xcode 7.3.
When i just make a GET request i got the error as title and the information:
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
error message:
The certificate for this server is invalid. You might be connecting to a >server that is pretending to be “https://api.domain.com” which >could put your confidential information at risk.
I search the solution but none works. Add these into info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
OR (my current setting)
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>https://api.domain.com:9002</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
I Searched:
https://stackoverflow.com/a/32912578/291240