From 6797ed8be63e17d6e715d2630c718648516cab8f Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 13 Jan 2018 17:14:28 +0800 Subject: [PATCH] Update the SD_MAC define --- SDWebImage/SDWebImageCompat.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SDWebImage/SDWebImageCompat.h b/SDWebImage/SDWebImageCompat.h index 58f443cd..629db1bc 100644 --- a/SDWebImage/SDWebImageCompat.h +++ b/SDWebImage/SDWebImageCompat.h @@ -13,10 +13,9 @@ #error SDWebImage does not support Objective-C Garbage Collection #endif -// Apple's defines from TargetConditionals.h are a bit weird. // Seems like TARGET_OS_MAC is always defined (on all platforms). -// To determine if we are running on OSX, we can only rely on TARGET_OS_IPHONE=0 and all the other platforms -#if !TARGET_OS_IPHONE && !TARGET_OS_IOS && !TARGET_OS_TV && !TARGET_OS_WATCH +// To determine if we are running on macOS, use TARGET_OS_OSX in Xcode 8 +#if TARGET_OS_OSX #define SD_MAC 1 #else #define SD_MAC 0