AFHTTPSessionManager成功回调在主线程中

时间:2016-03-25 09:04:15

标签: objective-c afnetworking-3 afhttpsessionmanager

我有使用AFHTTPSessionManager的请求:

success

我检查failureprogress回调是否在主线程中 如何使这些回调不在ReSharperHostException A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. One or more errors occurred. Package 'Newtonsoft.Json.8.0.3' already exists in project 'MovieLensMongo' --- EXCEPTION #1/5 [PackageAlreadyInstalledException] Message = “Package 'Newtonsoft.Json.8.0.3' already exists in project 'MovieLensMongo'” ExceptionPath.1 = Root.InnerException.InnerException.InnerException.InnerException ExceptionPath.2 = Root.InnerException.InnerExceptions.#0.InnerException.InnerException ExceptionPath.3 = Root.InnerException.InnerException.InnerExceptions.#0.InnerException ExceptionPath.4 = Root.InnerException.InnerExceptions.#0.InnerExceptions.#0.InnerException ClassName = NuGet.PackageManagement.PackageAlreadyInstalledException HResult = COR_E_EXCEPTION=80131500 --- Outer --- 回调等主线程中运行?

1 个答案:

答案 0 :(得分:2)

您可以设置operationQueue以选择委托方法的调用方式,并设置completionQueue以选择如何调用完成块。