1. When creating a new project, the following error is reported when making a request for a network request:
"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 '
Workaround:
1, add nsapptransportsecurity type Dictionary in Info.plist;
2, add the Nsallowsarbitraryloads type Boolean under Nsapptransportsecurity, the value is set to YES;
2. Use the afnetworking 3.0+ version for the network request, reported the following error:
Error domain=com.alamofire.error.serialization.response code=-1016 "Request failed:unacceptable content-type:text/ HTML "userinfo={com.alamofire.serialization.response.error.response=<nshttpurlresponse:0x60000002db00>
Workaround:
Afhttpsessionmanager *manager = [Afhttpsessionmanager manager];
Manager.responseserializer = [Afhttpresponseserializer new];
Manager.responseSerializer.acceptableContentTypes = [Nsset setwithobjects:@ "text/html", nil];
Continuous update ...
Bugs that are encountered with iOS development