网络请求的时候,xcode 控制台提示App Transport Security has blocked a cleartext HTTP (http://) resource load(原因大致是:ATS禁止了HTTP的明文传输,因为它不安全。)
解决方法:
在Info.plist文件中添加"App Transport Security Settings", "Type"为"Dictionary"
再在这个字典中添加"Allow Arbitray Loads", "Type" 为"Boolean","Value"为"YES"
如下图: