The error encountered
notthetheofa secure connection.
Juvenile Mo Panic, this is the upgrade of the iOS9 https problem, solved very simple, close him, we still use HTTP
Solve
1: Add nsapptransportsecurity type dictionary in Info.plist.
2: Add Nsallowsarbitraryloads Type Boolean under Nsapptransportsecurity, set value to Yes
3: Note that there is also a info.plist below the unit test, it is not useful to modify that file!
Other
This can also be configured if you want to have a domain name that supports https:
Added method of configuration
For those that do not support HTTPS, you should first consider adding exceptions
The way to add exceptions is also simple:
Left Info.plist select Open with source code
Then add a configuration similar to the following:
<key>Nsapptransportsecurity</key> <dict> <key>Nsexceptiondomains</key> <dict> <key>Qq.com</key> <dict> <key>Nsincludessubdomains</key> <true/> </dict> <key>sina.com.cn</key> <dict> <key>Nsincludessubdomains</key> <true/> </dict> </dict> </dict>
Depending on the domain name you need to modify, Nsincludesubdomains, as the name implies, includes subdomain meaning.
Ios9-xcode7 Common Error HTTPS problem resolution