问题
I added the NsAppTransportSecurity
as dictionary and added the key NsAllowArbitaryLoads
exactly how everybody said but it does not work for me.
I made a clean rebuild of the project, but I still the same error.
回答1:
It should be done like this
NSAppTransportSecurity <- Type Dictionary NSAllowsArbitraryLoads <- Type Boolean Value YES
回答2:
It should be done like:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>your.domain.name.net</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
来源:https://stackoverflow.com/questions/32703226/app-transport-security-policy-requires-the-use-of-a-secure-connection