Authored by DreamPiggy
Committed by GitHub

Merge pull request #2206 from dreampiggy/fix_macOS_deployment_version

Fix the macOS wrong minimum deployment target version to 10.9
@@ -36,7 +36,7 @@ This library provides an async image downloader with cache support. For convenie @@ -36,7 +36,7 @@ This library provides an async image downloader with cache support. For convenie
36 - iOS 7.0 or later 36 - iOS 7.0 or later
37 - tvOS 9.0 or later 37 - tvOS 9.0 or later
38 - watchOS 2.0 or later 38 - watchOS 2.0 or later
39 -- OS X 10.8 or later 39 +- macOS 10.9 or later
40 - Xcode 7.3 or later 40 - Xcode 7.3 or later
41 41
42 #### Backwards compatibility 42 #### Backwards compatibility
@@ -93,7 +93,7 @@ imageView.sd_setImage(with: URL(string: "http://www.domain.com/path/to/image.jpg @@ -93,7 +93,7 @@ imageView.sd_setImage(with: URL(string: "http://www.domain.com/path/to/image.jpg
93 - If you use cocoapods, add `pod 'SDWebImage/GIF'` to your podfile. 93 - If you use cocoapods, add `pod 'SDWebImage/GIF'` to your podfile.
94 - To use it, simply make sure you use `FLAnimatedImageView` instead of `UIImageView`. 94 - To use it, simply make sure you use `FLAnimatedImageView` instead of `UIImageView`.
95 - **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) 95 - **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)
96 -- **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 96 +- **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
97 97
98 ## Installation 98 ## Installation
99 99
@@ -2,7 +2,7 @@ Pod::Spec.new do |s| @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
2 s.name = 'SDWebImage' 2 s.name = 'SDWebImage'
3 s.version = '4.3.0' 3 s.version = '4.3.0'
4 4
5 - s.osx.deployment_target = '10.8' 5 + s.osx.deployment_target = '10.9'
6 s.ios.deployment_target = '7.0' 6 s.ios.deployment_target = '7.0'
7 s.tvos.deployment_target = '9.0' 7 s.tvos.deployment_target = '9.0'
8 s.watchos.deployment_target = '2.0' 8 s.watchos.deployment_target = '2.0'
@@ -33,7 +33,7 @@ Pod::Spec.new do |s| @@ -33,7 +33,7 @@ Pod::Spec.new do |s|
33 end 33 end
34 34
35 s.subspec 'MapKit' do |mk| 35 s.subspec 'MapKit' do |mk|
36 - mk.osx.deployment_target = '10.8' 36 + mk.osx.deployment_target = '10.9'
37 mk.ios.deployment_target = '7.0' 37 mk.ios.deployment_target = '7.0'
38 mk.tvos.deployment_target = '9.0' 38 mk.tvos.deployment_target = '9.0'
39 mk.source_files = 'SDWebImage/MKAnnotationView+WebCache.*' 39 mk.source_files = 'SDWebImage/MKAnnotationView+WebCache.*'
@@ -3568,6 +3568,8 @@ @@ -3568,6 +3568,8 @@
3568 00733A511BC487C100A5A117 /* Debug */ = { 3568 00733A511BC487C100A5A117 /* Debug */ = {
3569 isa = XCBuildConfiguration; 3569 isa = XCBuildConfiguration;
3570 buildSettings = { 3570 buildSettings = {
  3571 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3572 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3571 "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 3573 "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
3572 CURRENT_PROJECT_VERSION = 1; 3574 CURRENT_PROJECT_VERSION = 1;
3573 DEBUG_INFORMATION_FORMAT = dwarf; 3575 DEBUG_INFORMATION_FORMAT = dwarf;
@@ -3597,6 +3599,8 @@ @@ -3597,6 +3599,8 @@
3597 00733A521BC487C100A5A117 /* Release */ = { 3599 00733A521BC487C100A5A117 /* Release */ = {
3598 isa = XCBuildConfiguration; 3600 isa = XCBuildConfiguration;
3599 buildSettings = { 3601 buildSettings = {
  3602 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3603 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3600 "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 3604 "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
3601 COPY_PHASE_STRIP = NO; 3605 COPY_PHASE_STRIP = NO;
3602 CURRENT_PROJECT_VERSION = 1; 3606 CURRENT_PROJECT_VERSION = 1;
@@ -3626,6 +3630,8 @@ @@ -3626,6 +3630,8 @@
3626 4314D1971D0E0E3B004B36C9 /* Debug */ = { 3630 4314D1971D0E0E3B004B36C9 /* Debug */ = {
3627 isa = XCBuildConfiguration; 3631 isa = XCBuildConfiguration;
3628 buildSettings = { 3632 buildSettings = {
  3633 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3634 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3629 GCC_PREPROCESSOR_DEFINITIONS = ( 3635 GCC_PREPROCESSOR_DEFINITIONS = (
3630 "WEBP_USE_INTRINSICS=1", 3636 "WEBP_USE_INTRINSICS=1",
3631 "$(inherited)", 3637 "$(inherited)",
@@ -3641,6 +3647,8 @@ @@ -3641,6 +3647,8 @@
3641 4314D1981D0E0E3B004B36C9 /* Release */ = { 3647 4314D1981D0E0E3B004B36C9 /* Release */ = {
3642 isa = XCBuildConfiguration; 3648 isa = XCBuildConfiguration;
3643 buildSettings = { 3649 buildSettings = {
  3650 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3651 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3644 GCC_PREPROCESSOR_DEFINITIONS = ( 3652 GCC_PREPROCESSOR_DEFINITIONS = (
3645 "WEBP_USE_INTRINSICS=1", 3653 "WEBP_USE_INTRINSICS=1",
3646 "$(inherited)", 3654 "$(inherited)",
@@ -3656,6 +3664,8 @@ @@ -3656,6 +3664,8 @@
3656 431BB7011D06D2C1006A3455 /* Debug */ = { 3664 431BB7011D06D2C1006A3455 /* Debug */ = {
3657 isa = XCBuildConfiguration; 3665 isa = XCBuildConfiguration;
3658 buildSettings = { 3666 buildSettings = {
  3667 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3668 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3659 "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 3669 "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
3660 CURRENT_PROJECT_VERSION = 1; 3670 CURRENT_PROJECT_VERSION = 1;
3661 DEBUG_INFORMATION_FORMAT = dwarf; 3671 DEBUG_INFORMATION_FORMAT = dwarf;
@@ -3688,6 +3698,8 @@ @@ -3688,6 +3698,8 @@
3688 431BB7021D06D2C1006A3455 /* Release */ = { 3698 431BB7021D06D2C1006A3455 /* Release */ = {
3689 isa = XCBuildConfiguration; 3699 isa = XCBuildConfiguration;
3690 buildSettings = { 3700 buildSettings = {
  3701 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3702 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3691 "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 3703 "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
3692 COPY_PHASE_STRIP = NO; 3704 COPY_PHASE_STRIP = NO;
3693 CURRENT_PROJECT_VERSION = 1; 3705 CURRENT_PROJECT_VERSION = 1;
@@ -3721,6 +3733,8 @@ @@ -3721,6 +3733,8 @@
3721 isa = XCBuildConfiguration; 3733 isa = XCBuildConfiguration;
3722 buildSettings = { 3734 buildSettings = {
3723 APPLICATION_EXTENSION_API_ONLY = YES; 3735 APPLICATION_EXTENSION_API_ONLY = YES;
  3736 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3737 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3724 COMBINE_HIDPI_IMAGES = YES; 3738 COMBINE_HIDPI_IMAGES = YES;
3725 DEFINES_MODULE = YES; 3739 DEFINES_MODULE = YES;
3726 DYLIB_COMPATIBILITY_VERSION = 1; 3740 DYLIB_COMPATIBILITY_VERSION = 1;
@@ -3730,7 +3744,7 @@ @@ -3730,7 +3744,7 @@
3730 GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; 3744 GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
3731 INFOPLIST_FILE = WebImage/Info.plist; 3745 INFOPLIST_FILE = WebImage/Info.plist;
3732 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 3746 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
3733 - MACOSX_DEPLOYMENT_TARGET = 10.8; 3747 + MACOSX_DEPLOYMENT_TARGET = 10.9;
3734 MTL_ENABLE_DEBUG_INFO = YES; 3748 MTL_ENABLE_DEBUG_INFO = YES;
3735 PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios"; 3749 PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios";
3736 PRODUCT_NAME = SDWebImage; 3750 PRODUCT_NAME = SDWebImage;
@@ -3742,6 +3756,8 @@ @@ -3742,6 +3756,8 @@
3742 isa = XCBuildConfiguration; 3756 isa = XCBuildConfiguration;
3743 buildSettings = { 3757 buildSettings = {
3744 APPLICATION_EXTENSION_API_ONLY = YES; 3758 APPLICATION_EXTENSION_API_ONLY = YES;
  3759 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3760 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3745 COMBINE_HIDPI_IMAGES = YES; 3761 COMBINE_HIDPI_IMAGES = YES;
3746 DEFINES_MODULE = YES; 3762 DEFINES_MODULE = YES;
3747 DYLIB_COMPATIBILITY_VERSION = 1; 3763 DYLIB_COMPATIBILITY_VERSION = 1;
@@ -3751,7 +3767,7 @@ @@ -3751,7 +3767,7 @@
3751 ENABLE_STRICT_OBJC_MSGSEND = YES; 3767 ENABLE_STRICT_OBJC_MSGSEND = YES;
3752 INFOPLIST_FILE = WebImage/Info.plist; 3768 INFOPLIST_FILE = WebImage/Info.plist;
3753 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 3769 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
3754 - MACOSX_DEPLOYMENT_TARGET = 10.8; 3770 + MACOSX_DEPLOYMENT_TARGET = 10.9;
3755 MTL_ENABLE_DEBUG_INFO = NO; 3771 MTL_ENABLE_DEBUG_INFO = NO;
3756 PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios"; 3772 PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios";
3757 PRODUCT_NAME = SDWebImage; 3773 PRODUCT_NAME = SDWebImage;
@@ -3763,6 +3779,8 @@ @@ -3763,6 +3779,8 @@
3763 isa = XCBuildConfiguration; 3779 isa = XCBuildConfiguration;
3764 buildSettings = { 3780 buildSettings = {
3765 APPLICATION_EXTENSION_API_ONLY = YES; 3781 APPLICATION_EXTENSION_API_ONLY = YES;
  3782 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3783 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3766 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 3784 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
3767 DEFINES_MODULE = YES; 3785 DEFINES_MODULE = YES;
3768 DYLIB_COMPATIBILITY_VERSION = 1; 3786 DYLIB_COMPATIBILITY_VERSION = 1;
@@ -3785,6 +3803,8 @@ @@ -3785,6 +3803,8 @@
3785 isa = XCBuildConfiguration; 3803 isa = XCBuildConfiguration;
3786 buildSettings = { 3804 buildSettings = {
3787 APPLICATION_EXTENSION_API_ONLY = YES; 3805 APPLICATION_EXTENSION_API_ONLY = YES;
  3806 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3807 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3788 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 3808 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
3789 DEFINES_MODULE = YES; 3809 DEFINES_MODULE = YES;
3790 DYLIB_COMPATIBILITY_VERSION = 1; 3810 DYLIB_COMPATIBILITY_VERSION = 1;
@@ -3806,6 +3826,8 @@ @@ -3806,6 +3826,8 @@
3806 53761323155AD0D5005750A4 /* Debug */ = { 3826 53761323155AD0D5005750A4 /* Debug */ = {
3807 isa = XCBuildConfiguration; 3827 isa = XCBuildConfiguration;
3808 buildSettings = { 3828 buildSettings = {
  3829 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3830 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3809 GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; 3831 GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
3810 IPHONEOS_DEPLOYMENT_TARGET = 8.0; 3832 IPHONEOS_DEPLOYMENT_TARGET = 8.0;
3811 PRODUCT_NAME = "$(TARGET_NAME)"; 3833 PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3818,6 +3840,8 @@ @@ -3818,6 +3840,8 @@
3818 53761324155AD0D5005750A4 /* Release */ = { 3840 53761324155AD0D5005750A4 /* Release */ = {
3819 isa = XCBuildConfiguration; 3841 isa = XCBuildConfiguration;
3820 buildSettings = { 3842 buildSettings = {
  3843 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  3844 + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
3821 IPHONEOS_DEPLOYMENT_TARGET = 8.0; 3845 IPHONEOS_DEPLOYMENT_TARGET = 8.0;
3822 PRODUCT_NAME = "$(TARGET_NAME)"; 3846 PRODUCT_NAME = "$(TARGET_NAME)";
3823 PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage; 3847 PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage;
@@ -468,6 +468,8 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over @@ -468,6 +468,8 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
468 static BOOL canDecode = NO; 468 static BOOL canDecode = NO;
469 static dispatch_once_t onceToken; 469 static dispatch_once_t onceToken;
470 dispatch_once(&onceToken, ^{ 470 dispatch_once(&onceToken, ^{
  471 +#pragma clang diagnostic push
  472 +#pragma clang diagnostic ignored "-Wunguarded-availability"
471 #if TARGET_OS_SIMULATOR || SD_WATCH 473 #if TARGET_OS_SIMULATOR || SD_WATCH
472 canDecode = NO; 474 canDecode = NO;
473 #elif SD_MAC 475 #elif SD_MAC
@@ -487,6 +489,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over @@ -487,6 +489,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
487 canDecode = NO; 489 canDecode = NO;
488 } 490 }
489 #endif 491 #endif
  492 +#pragma clang diagnostic pop
490 }); 493 });
491 return canDecode; 494 return canDecode;
492 } 495 }