错误信息以下javascript
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.html
这是由于苹果引入了ATS特征,要求应用内网络请求采用HTTPS协议,这样主要是为了安全。可是目前接口采用HTTP协议,很难作出修改,解决方案以下。java
如出现以下错误信息json
error:Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" 安全
这个问题是由于AFNetworking默认的接收类型不包括”text/html”,须要到“AFURLResponseSerialization.m”中修改成如下代码,即添加其中缺乏的@”text/html”。网络
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/html", @"text/json", @"text/javascript", nil];app