Merge pull request #2206 from dreampiggy/fix_macOS_deployment_version

Fix the macOS wrong minimum deployment target version to 10.9
This commit is contained in:
DreamPiggy 2018-02-01 13:50:31 +08:00 committed by GitHub
commit bd22ad8725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 6 deletions

View File

@ -36,7 +36,7 @@ This library provides an async image downloader with cache support. For convenie
- iOS 7.0 or later - iOS 7.0 or later
- tvOS 9.0 or later - tvOS 9.0 or later
- watchOS 2.0 or later - watchOS 2.0 or later
- OS X 10.8 or later - macOS 10.9 or later
- Xcode 7.3 or later - Xcode 7.3 or later
#### Backwards compatibility #### Backwards compatibility
@ -93,7 +93,7 @@ imageView.sd_setImage(with: URL(string: "http://www.domain.com/path/to/image.jpg
- If you use cocoapods, add `pod 'SDWebImage/GIF'` to your podfile. - If you use cocoapods, add `pod 'SDWebImage/GIF'` to your podfile.
- To use it, simply make sure you use `FLAnimatedImageView` instead of `UIImageView`. - To use it, simply make sure you use `FLAnimatedImageView` instead of `UIImageView`.
- **Note**: there is a backwards compatible feature, so if you are still trying to load a GIF into a `UIImageView`, it will only show the 1st frame as a static image by default. However, you can enable the full GIF support by using the built-in GIF coder. See [GIF coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#gif-coder) - **Note**: there is a backwards compatible feature, so if you are still trying to load a GIF into a `UIImageView`, it will only show the 1st frame as a static image by default. However, you can enable the full GIF support by using the built-in GIF coder. See [GIF coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#gif-coder)
- **Important**: FLAnimatedImage only works on the iOS platform. For OS X, use `NSImageView` with `animates` set to `YES` to show the entire animated images and `NO` to only show the 1st frame. For all the other platforms (tvOS, watchOS) we will fallback to the backwards compatibility feature described above - **Important**: FLAnimatedImage only works on the iOS platform. For macOS, use `NSImageView` with `animates` set to `YES` to show the entire animated images and `NO` to only show the 1st frame. For all the other platforms (tvOS, watchOS) we will fallback to the backwards compatibility feature described above
## Installation ## Installation

View File

@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = 'SDWebImage' s.name = 'SDWebImage'
s.version = '4.3.0' s.version = '4.3.0'
s.osx.deployment_target = '10.8' s.osx.deployment_target = '10.9'
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.tvos.deployment_target = '9.0' s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0' s.watchos.deployment_target = '2.0'
@ -33,7 +33,7 @@ Pod::Spec.new do |s|
end end
s.subspec 'MapKit' do |mk| s.subspec 'MapKit' do |mk|
mk.osx.deployment_target = '10.8' mk.osx.deployment_target = '10.9'
mk.ios.deployment_target = '7.0' mk.ios.deployment_target = '7.0'
mk.tvos.deployment_target = '9.0' mk.tvos.deployment_target = '9.0'
mk.source_files = 'SDWebImage/MKAnnotationView+WebCache.*' mk.source_files = 'SDWebImage/MKAnnotationView+WebCache.*'

View File

@ -3568,6 +3568,8 @@
00733A511BC487C100A5A117 /* Debug */ = { 00733A511BC487C100A5A117 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
@ -3597,6 +3599,8 @@
00733A521BC487C100A5A117 /* Release */ = { 00733A521BC487C100A5A117 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
@ -3626,6 +3630,8 @@
4314D1971D0E0E3B004B36C9 /* Debug */ = { 4314D1971D0E0E3B004B36C9 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"WEBP_USE_INTRINSICS=1", "WEBP_USE_INTRINSICS=1",
"$(inherited)", "$(inherited)",
@ -3641,6 +3647,8 @@
4314D1981D0E0E3B004B36C9 /* Release */ = { 4314D1981D0E0E3B004B36C9 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"WEBP_USE_INTRINSICS=1", "WEBP_USE_INTRINSICS=1",
"$(inherited)", "$(inherited)",
@ -3656,6 +3664,8 @@
431BB7011D06D2C1006A3455 /* Debug */ = { 431BB7011D06D2C1006A3455 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
@ -3688,6 +3698,8 @@
431BB7021D06D2C1006A3455 /* Release */ = { 431BB7021D06D2C1006A3455 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
@ -3721,6 +3733,8 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES; APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
@ -3730,7 +3744,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
INFOPLIST_FILE = WebImage/Info.plist; INFOPLIST_FILE = WebImage/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.8; MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios"; PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios";
PRODUCT_NAME = SDWebImage; PRODUCT_NAME = SDWebImage;
@ -3742,6 +3756,8 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES; APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
@ -3751,7 +3767,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = WebImage/Info.plist; INFOPLIST_FILE = WebImage/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.8; MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios"; PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios";
PRODUCT_NAME = SDWebImage; PRODUCT_NAME = SDWebImage;
@ -3763,6 +3779,8 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES; APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
@ -3785,6 +3803,8 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES; APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
@ -3806,6 +3826,8 @@
53761323155AD0D5005750A4 /* Debug */ = { 53761323155AD0D5005750A4 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
@ -3818,6 +3840,8 @@
53761324155AD0D5005750A4 /* Release */ = { 53761324155AD0D5005750A4 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage; PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage;

View File

@ -468,6 +468,8 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
static BOOL canDecode = NO; static BOOL canDecode = NO;
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
#if TARGET_OS_SIMULATOR || SD_WATCH #if TARGET_OS_SIMULATOR || SD_WATCH
canDecode = NO; canDecode = NO;
#elif SD_MAC #elif SD_MAC
@ -487,6 +489,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
canDecode = NO; canDecode = NO;
} }
#endif #endif
#pragma clang diagnostic pop
}); });
return canDecode; return canDecode;
} }