最近新建APP的时候请求网络的时候报错,The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
解决办法
- 1.在Info.plist中添加
NSAppTransportSecurity
类型Dictionary
。 - 2.在
NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES