From 0a3de62849224ad0f878c801c4aa0a33edc30a98 Mon Sep 17 00:00:00 2001 From: Matt Baker Date: Tue, 1 Oct 2013 17:23:45 -0700 Subject: [PATCH 1/2] Compile AFNetworking for iOS 6 and iOS 7 - By using __IPHONE_OS_VERSION_MAX_ALLOWED and __MAC_OS_X_VERSION_MAX_ALLOWED, it will allow users who have minimum of iOS 6 or Mac OSX 10.8 to levarage NSURLSession for users on iOS 7 and Mac OSX 10.9 --- AFNetworking.podspec | 2 -- AFNetworking/AFURLSessionManager.h | 2 +- AFNetworking/AFURLSessionManager.m | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/AFNetworking.podspec b/AFNetworking.podspec index b79bc60..1047f47 100644 --- a/AFNetworking.podspec +++ b/AFNetworking.podspec @@ -40,8 +40,6 @@ Pod::Spec.new do |s| end s.subspec 'NSURLSession' do |ss| - ss.ios.deployment_target = '7.0' - ss.osx.deployment_target = '10.9' ss.dependency 'AFNetworking/Serialization' ss.dependency 'AFNetworking/Reachability' diff --git a/AFNetworking/AFURLSessionManager.h b/AFNetworking/AFURLSessionManager.h index 81a702a..9c4911c 100644 --- a/AFNetworking/AFURLSessionManager.h +++ b/AFNetworking/AFURLSessionManager.h @@ -80,7 +80,7 @@ - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied. */ -#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) @interface AFURLSessionManager : NSObject diff --git a/AFNetworking/AFURLSessionManager.m b/AFNetworking/AFURLSessionManager.m index f35b4a3..c1f92e2 100644 --- a/AFNetworking/AFURLSessionManager.m +++ b/AFNetworking/AFURLSessionManager.m @@ -22,7 +22,7 @@ #import "AFURLSessionManager.h" -#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) static dispatch_queue_t url_session_manager_processing_queue() { static dispatch_queue_t af_url_session_manager_processing_queue; From 026900bf72dbc26bc0371b316a6b3d3c7ce1ad78 Mon Sep 17 00:00:00 2001 From: Matt Baker Date: Tue, 1 Oct 2013 17:23:45 -0700 Subject: [PATCH 2/2] Compile AFNetworking for iOS 6 and iOS 7 - By using __IPHONE_OS_VERSION_MAX_ALLOWED and __MAC_OS_X_VERSION_MAX_ALLOWED, it will allow users who have minimum of iOS 6 or Mac OSX 10.8 to levarage NSURLSession for users on iOS 7 and Mac OSX 10.9 --- AFNetworking/AFNetworking.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AFNetworking/AFNetworking.h b/AFNetworking/AFNetworking.h index 9ffbec2..68273da 100644 --- a/AFNetworking/AFNetworking.h +++ b/AFNetworking/AFNetworking.h @@ -35,8 +35,8 @@ #import "AFHTTPRequestOperation.h" #import "AFHTTPRequestOperationManager.h" -#if ( ( defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || \ - ( defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ) ) +#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ + ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) ) #import "AFURLSessionManager.h" #import "AFHTTPSessionManager.h" #endif