diff --git a/OHHTTPStubs.podspec b/OHHTTPStubs.podspec index 48e2b5b3..5e586767 100644 --- a/OHHTTPStubs.podspec +++ b/OHHTTPStubs.podspec @@ -38,5 +38,6 @@ Pod::Spec.new do |s| s.requires_arc = true s.ios.deployment_target = '5.0' s.osx.deployment_target = '10.7' + s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'XCODE_VERSION=$(XCODE_VERSION_MAJOR)' } end diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj b/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj index 945ad2e1..02889865 100644 --- a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj +++ b/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj @@ -603,6 +603,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", + "XCODE_VERSION=$(XCODE_VERSION_MAJOR)", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; @@ -637,6 +638,10 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "XCODE_VERSION=$(XCODE_VERSION_MAJOR)", + "$(inherited)", + ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.h b/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.h index 98b0aa47..319ae0af 100644 --- a/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.h +++ b/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.h @@ -30,9 +30,7 @@ * (at least part of it) so that we can use the same API in older Xcode versions ----------------------------------------------------------------------------------*/ - -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < 80000) \ - || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101000) +#if XCODE_VERSION < 0600 #define XCTestExpectation_OHRetroCompat_BETTER_FAILURE_LOCATIONS 1 diff --git a/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.m b/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.m index 81974cd6..c486d470 100644 --- a/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.m +++ b/OHHTTPStubs/XCTestExpectation+Xcode5/XCTestExpectation+OHRetroCompat.m @@ -30,10 +30,7 @@ * (at least part of it) so that we can use the same API in older Xcode versions ----------------------------------------------------------------------------------*/ - -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < 80000) \ - || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101000) - +#if XCODE_VERSION < 0600 #import "XCTestExpectation+OHRetroCompat.h" #import