Does AFNetworking call the completion block on the main thread? or is it called in the background, requiring me to manually dispatch my UI updates to the main thread?
<
In AFNetworking 2, AFHTTPRequestOperationManager has a completionQueue property.
The dispatch queue for the
completionBlockof request operations. IfNULL(default), the main queue is used.
#if OS_OBJECT_USE_OBJC
@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
#else
@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue;
#endif
In AFNetworking 3, the completionQueue property has been moved to AFURLSessionManager (which AFHTTPSessionManager extends).
The dispatch queue for
completionBlock. IfNULL(default), the main queue is used.
@property (nonatomic, strong) dispatch_queue_t completionQueue;
@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;