Fix the macOS wrong minimum deployment target version to 10.9. And also fix the warning on Xcode 9 by enable more warning options

This commit is contained in:
DreamPiggy 2018-02-01 12:54:38 +08:00
parent 406220bb52
commit aacca305c0
3 changed files with 31 additions and 4 deletions

View File

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

View File

@ -3568,6 +3568,8 @@
00733A511BC487C100A5A117 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
@ -3597,6 +3599,8 @@
00733A521BC487C100A5A117 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
@ -3626,6 +3630,8 @@
4314D1971D0E0E3B004B36C9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
GCC_PREPROCESSOR_DEFINITIONS = (
"WEBP_USE_INTRINSICS=1",
"$(inherited)",
@ -3641,6 +3647,8 @@
4314D1981D0E0E3B004B36C9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
GCC_PREPROCESSOR_DEFINITIONS = (
"WEBP_USE_INTRINSICS=1",
"$(inherited)",
@ -3656,6 +3664,8 @@
431BB7011D06D2C1006A3455 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
@ -3688,6 +3698,8 @@
431BB7021D06D2C1006A3455 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
@ -3721,6 +3733,8 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -3730,7 +3744,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
INFOPLIST_FILE = WebImage/Info.plist;
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;
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios";
PRODUCT_NAME = SDWebImage;
@ -3742,6 +3756,8 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -3751,7 +3767,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = WebImage/Info.plist;
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;
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).ios";
PRODUCT_NAME = SDWebImage;
@ -3763,6 +3779,8 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -3785,6 +3803,8 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -3806,6 +3826,8 @@
53761323155AD0D5005750A4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -3818,6 +3840,8 @@
53761324155AD0D5005750A4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)";
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 dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
#if TARGET_OS_SIMULATOR || SD_WATCH
canDecode = NO;
#elif SD_MAC
@ -487,6 +489,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
canDecode = NO;
}
#endif
#pragma clang diagnostic pop
});
return canDecode;
}