Ios 后台刷新中API调用出错
我正在使用Ios 后台刷新中API调用出错,ios,objective-c,asynchronous,nsurlconnection,Ios,Objective C,Asynchronous,Nsurlconnection,我正在使用 [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) { }. 请求每20秒调用一次,我收到错误500。请有人帮我解决这个问题。首
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError)
{
}.
请求每20秒调用一次,我收到
错误500。请有人帮我解决这个问题。首先,确保正确设置了传输安全设置(请参阅)。在此之后,错误500是一个内部服务器错误,因此问题是服务器端,可能是与发送到服务器的参数丢失或错误有关的错误,也可能是服务器上的stg else。是的,问题在于构造请求的方式。在我们以任何有意义的方式提供帮助之前,您必须发布更多的代码。另外,为什么不使用NSURLSession?您仍然支持10.8/iOS 6吗?