When compiling the iOS app in Xcode7.0 and above, a new feature of iOS9 is used by default, making all HTTP connections disabled, and the APIs used in the project without HTTPS support are tragic. On the official document, there is such a phrase
"> App transport security app Transport Security (ATS) enforces best practices in the Secur e connections between an app. ATS prevents accidental disclosure, provides secure default behavior, and are easy to adopt; It is also with default in IOS 9 and OS X v10.11.
You are should adopt ATS as soon as possible, regardless of whether you ' re creating a new app or updating a existing one. If you are developing a new app, you should use HTTPS exclusively. If you are have an existing app, your should use HTTPS as so much as you can right now, and create a's for migrating the rest O F your app as soon as possible. In addition, your communication through higher-level APIs needs to is encrypted using TLS version 1.2 with forward secrecy . If you try to make a connection which doesn ' t follow this requirement, the error is thrown. If your app needs to make a request to a insecure domain, your have to specify this domain in your app ' s info.plist file.< /pre>
You can see here that by modifying the Info.plist file you can continue to use the HTTP connection in the following ways:
1. Find the Info.plist file on the left side of the project, you can search by filter
2. On the right click Add Row Add nsapptransportsecurity, type dictionary, and then add subprojects Nsallowsarbitraryloads class behavior Boolean value Yes
This allows you to reuse the normal HTTP connection. But if you have a condition, you should go and get an HTTPS.
The above is a small set to introduce the iOS9 and XCode7 can not use the HTTP connection of the fast solution, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!