如题
看看是不是这个原因:
iOS 强制要求使用 https,如果你请求的接口是 http协议就会出错,临时解决办法是在 Info.plist 里面加上:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
但是这个办法只能今年底前使用,之后苹果汇禁止这么用,所以尽快部署 https 接口。
在xcode里加了这个
我也遇到了这个问题,请问解决了吗?