首页 > 代码库 > afnetworking问题

afnetworking问题

AFNetworking 出现问题:

<style>p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.7px "PingFang SC"; color: #333333; background-color: #ffffff } span.s1 { }</style>

App TransportSecurity has blocked a cleartext HTTP (http://) resource load since it isinsecure. Temporary exceptions can be configured via your app‘s Info.plistfile.

 

 

解决方法:

      在Info.plist中添加  App Transport Security Settings ---》type选择Dictiomnary  在里面添加Allow Arbitrary Loads ---》type选择Boolean value选择YES

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSAllowsArbitraryLoads</key>
	<true/>
</dict>
</plist>

  技术分享

 

afnetworking问题