App Transport Security
28 Mar 2016Platforms: iOS 9.0 and later, OS X v10. 11 and later
Summary:
Protocol: TLS 1.2 and later
Certificates:
Forward secrecy (FS):
When the backend server does not follow ATS rules (Eg Using lower level of Transport Layer Securiy, http protocol or self-signed etc. ), it should make a whitelist. It only needs to revise the file of "Info. plist ",
Here are some sample settings:
It can specify protocol, which is lower than TSL v1. 2, or which is not supported FS
<key >NSAppTransportSecurity</key>
<dict >
<key >NSExceptionDomains</key>
<dict >
<key >your_server.example.com</key>
<dict >
<key >NSThirdPartyExceptionMinimumTLSVersion</key>
<string >TLSv1.0</string>
<key >NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false />
</dict >
</dict >
</dict >
<key >NSAppTransportSecurity</key>
<dict >
<key >NSExceptionDomains</key>
<dict >
<key >your_server.example.com</key>
<dict >
<key >NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true />
</dict >
</dict >
</dict >
<key >NSAppTransportSecurity</key>
<dict >
<key >NSAllowsArbitraryLoads</key>
<true />
</dict >
P.S. If the domain which cannot be controlled by the developer, it needs a parameter of "NSThirdPartyException". I do not know what is different. But it is work for me.
Reference: