diff --git a/AFNetworking/AFXMLRequestOperation.h b/AFNetworking/AFXMLRequestOperation.h index 10a0f89..197e1c2 100644 --- a/AFNetworking/AFXMLRequestOperation.h +++ b/AFNetworking/AFXMLRequestOperation.h @@ -50,7 +50,7 @@ */ @property (readonly, nonatomic) NSXMLParser *responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED /** An `NSXMLDocument` object constructed from the response data. If an error occurs while parsing, `nil` will be returned, and the `error` property will be set to the error. */ @@ -71,7 +71,7 @@ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParse))failure; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED /** Creates and returns an `AFXMLRequestOperation` object and sets the specified success and failure callbacks. diff --git a/AFNetworking/AFXMLRequestOperation.m b/AFNetworking/AFXMLRequestOperation.m index bdc935c..2efaba6 100644 --- a/AFNetworking/AFXMLRequestOperation.m +++ b/AFNetworking/AFXMLRequestOperation.m @@ -35,7 +35,7 @@ static dispatch_queue_t xml_request_operation_processing_queue() { @interface AFXMLRequestOperation () @property (readwrite, nonatomic) NSXMLParser *responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED @property (readwrite, nonatomic, retain) NSXMLDocument *responseXMLDocument; #endif @property (readwrite, nonatomic) NSError *XMLError; @@ -43,7 +43,7 @@ static dispatch_queue_t xml_request_operation_processing_queue() { @implementation AFXMLRequestOperation @synthesize responseXMLParser = _responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED @synthesize responseXMLDocument = _responseXMLDocument; #endif @synthesize XMLError = _XMLError; @@ -66,7 +66,7 @@ static dispatch_queue_t xml_request_operation_processing_queue() { return requestOperation; } -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#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 @@ -97,7 +97,7 @@ static dispatch_queue_t xml_request_operation_processing_queue() { return _responseXMLParser; } -#if __MAC_OS_X_VERSION_MIN_REQUIRED +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED - (NSXMLDocument *)responseXMLDocument { if (!_responseXMLDocument && [self.responseData length] > 0 && [self isFinished]) { NSError *error = nil;