diff --git a/AFNetworking/AFHTTPClient.h b/AFNetworking/AFHTTPClient.h index 400bdfa..68c6de8 100644 --- a/AFNetworking/AFHTTPClient.h +++ b/AFNetworking/AFHTTPClient.h @@ -148,7 +148,7 @@ typedef enum { @return The newly-initialized HTTP client */ -+ (AFHTTPClient *)clientWithBaseURL:(NSURL *)url; ++ (instancetype)clientWithBaseURL:(NSURL *)url; /** Initializes an `AFHTTPClient` object with the specified base URL. diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index c799f68..d97eb10 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -205,7 +205,7 @@ NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { @synthesize networkReachabilityStatusBlock = _networkReachabilityStatusBlock; #endif -+ (AFHTTPClient *)clientWithBaseURL:(NSURL *)url { ++ (instancetype)clientWithBaseURL:(NSURL *)url { return [[self alloc] initWithBaseURL:url]; } diff --git a/AFNetworking/AFImageRequestOperation.h b/AFNetworking/AFImageRequestOperation.h index b4d0e52..d991b25 100644 --- a/AFNetworking/AFImageRequestOperation.h +++ b/AFNetworking/AFImageRequestOperation.h @@ -76,11 +76,11 @@ @return A new image request operation */ #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(UIImage *image))success; ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(UIImage *image))success; #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSImage *image))success; ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSImage *image))success; #endif /** @@ -94,15 +94,15 @@ @return A new image request operation */ #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; #endif @end diff --git a/AFNetworking/AFImageRequestOperation.m b/AFNetworking/AFImageRequestOperation.m index c7337d3..1eca51e 100644 --- a/AFNetworking/AFImageRequestOperation.m +++ b/AFNetworking/AFImageRequestOperation.m @@ -46,8 +46,8 @@ static dispatch_queue_t image_request_operation_processing_queue() { #endif #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(UIImage *image))success ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(UIImage *image))success { return [self imageRequestOperationWithRequest:urlRequest imageProcessingBlock:nil success:^(NSURLRequest __unused *request, NSHTTPURLResponse __unused *response, UIImage *image) { if (success) { @@ -56,8 +56,8 @@ static dispatch_queue_t image_request_operation_processing_queue() { } failure:nil]; } #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSImage *image))success ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSImage *image))success { return [self imageRequestOperationWithRequest:urlRequest imageProcessingBlock:nil success:^(NSURLRequest __unused *request, NSHTTPURLResponse __unused *response, NSImage *image) { if (success) { @@ -69,10 +69,10 @@ static dispatch_queue_t image_request_operation_processing_queue() { #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(UIImage *(^)(UIImage *))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + imageProcessingBlock:(UIImage *(^)(UIImage *))imageProcessingBlock + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure { AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest]; [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { @@ -100,10 +100,10 @@ static dispatch_queue_t image_request_operation_processing_queue() { return requestOperation; } #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(NSImage *(^)(NSImage *))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure ++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest + imageProcessingBlock:(NSImage *(^)(NSImage *))imageProcessingBlock + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure { AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest]; [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { diff --git a/AFNetworking/AFJSONRequestOperation.h b/AFNetworking/AFJSONRequestOperation.h index 34acb4d..d625cb2 100644 --- a/AFNetworking/AFJSONRequestOperation.h +++ b/AFNetworking/AFJSONRequestOperation.h @@ -64,8 +64,8 @@ @return A new JSON request operation */ -+ (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure; ++ (instancetype)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure; @end diff --git a/AFNetworking/AFJSONRequestOperation.m b/AFNetworking/AFJSONRequestOperation.m index 51d407a..3807a0b 100644 --- a/AFNetworking/AFJSONRequestOperation.m +++ b/AFNetworking/AFJSONRequestOperation.m @@ -41,9 +41,9 @@ static dispatch_queue_t json_request_operation_processing_queue() { @synthesize JSONReadingOptions = _JSONReadingOptions; @synthesize JSONError = _JSONError; -+ (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure ++ (instancetype)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure { AFJSONRequestOperation *requestOperation = [(AFJSONRequestOperation *)[self alloc] initWithRequest:urlRequest]; [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { diff --git a/AFNetworking/AFNetworkActivityIndicatorManager.h b/AFNetworking/AFNetworkActivityIndicatorManager.h index 7b6cbe7..59cabcd 100644 --- a/AFNetworking/AFNetworkActivityIndicatorManager.h +++ b/AFNetworking/AFNetworkActivityIndicatorManager.h @@ -58,7 +58,7 @@ @return The systemwide network activity indicator manager. */ -+ (AFNetworkActivityIndicatorManager *)sharedManager; ++ (instancetype)sharedManager; /** Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. diff --git a/AFNetworking/AFNetworkActivityIndicatorManager.m b/AFNetworking/AFNetworkActivityIndicatorManager.m index afb6f00..8f4d868 100644 --- a/AFNetworking/AFNetworkActivityIndicatorManager.m +++ b/AFNetworking/AFNetworkActivityIndicatorManager.m @@ -42,7 +42,7 @@ static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17; @synthesize enabled = _enabled; @dynamic networkActivityIndicatorVisible; -+ (AFNetworkActivityIndicatorManager *)sharedManager { ++ (instancetype)sharedManager { static AFNetworkActivityIndicatorManager *_sharedManager = nil; static dispatch_once_t oncePredicate; dispatch_once(&oncePredicate, ^{ diff --git a/AFNetworking/AFPropertyListRequestOperation.h b/AFNetworking/AFPropertyListRequestOperation.h index c509274..04fe622 100644 --- a/AFNetworking/AFPropertyListRequestOperation.h +++ b/AFNetworking/AFPropertyListRequestOperation.h @@ -61,8 +61,8 @@ @return A new property list request operation */ -+ (AFPropertyListRequestOperation *)propertyListRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure; ++ (instancetype)propertyListRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure; @end diff --git a/AFNetworking/AFPropertyListRequestOperation.m b/AFNetworking/AFPropertyListRequestOperation.m index 56e4e4d..2eac6b6 100644 --- a/AFNetworking/AFPropertyListRequestOperation.m +++ b/AFNetworking/AFPropertyListRequestOperation.m @@ -43,9 +43,9 @@ static dispatch_queue_t property_list_request_operation_processing_queue() { @synthesize propertyListFormat = _propertyListFormat; @synthesize propertyListError = _propertyListError; -+ (AFPropertyListRequestOperation *)propertyListRequestOperationWithRequest:(NSURLRequest *)request - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure ++ (instancetype)propertyListRequestOperationWithRequest:(NSURLRequest *)request + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure { AFPropertyListRequestOperation *requestOperation = [(AFPropertyListRequestOperation *)[self alloc] initWithRequest:request]; [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { diff --git a/AFNetworking/AFXMLRequestOperation.h b/AFNetworking/AFXMLRequestOperation.h index 82624d0..6a327f4 100644 --- a/AFNetworking/AFXMLRequestOperation.h +++ b/AFNetworking/AFXMLRequestOperation.h @@ -66,9 +66,9 @@ @return A new XML request operation */ -+ (AFXMLRequestOperation *)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure; ++ (instancetype)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure; #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED @@ -81,9 +81,9 @@ @return A new XML request operation */ -+ (AFXMLRequestOperation *)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure; ++ (instancetype)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure; #endif @end diff --git a/AFNetworking/AFXMLRequestOperation.m b/AFNetworking/AFXMLRequestOperation.m index d50cdfd..a95ad82 100644 --- a/AFNetworking/AFXMLRequestOperation.m +++ b/AFNetworking/AFXMLRequestOperation.m @@ -48,9 +48,9 @@ static dispatch_queue_t xml_request_operation_processing_queue() { #endif @synthesize XMLError = _XMLError; -+ (AFXMLRequestOperation *)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure ++ (instancetype)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure { AFXMLRequestOperation *requestOperation = [(AFXMLRequestOperation *)[self alloc] initWithRequest:urlRequest]; [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { @@ -67,9 +67,9 @@ static dispatch_queue_t xml_request_operation_processing_queue() { } #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -+ (AFXMLRequestOperation *)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure ++ (instancetype)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure { AFXMLRequestOperation *requestOperation = [[self alloc] initWithRequest:urlRequest]; [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, __unused id responseObject) {