From 10b0b49f40891348cd7d81d36097093384391041 Mon Sep 17 00:00:00 2001 From: MarcoPolokk <58775058+MarcoPolokk@users.noreply.github.com> Date: Tue, 1 Dec 2020 18:06:52 +0100 Subject: [PATCH] Updated to deploy on iOS 9.0 with Swift 5. --- Chameleon.xcodeproj/project.pbxproj | 44 +++++---- .../xcshareddata/xcschemes/Chameleon.xcscheme | 8 +- Pod/Classes/Objective-C/UIAppearance+Swift.m | 13 +-- Pod/Classes/Objective-C/UIColor+Chameleon.m | 2 + Pod/Classes/Swift/ChameleonShorthand.swift | 98 +++++++++---------- 5 files changed, 80 insertions(+), 85 deletions(-) diff --git a/Chameleon.xcodeproj/project.pbxproj b/Chameleon.xcodeproj/project.pbxproj index 271dce67..2c506dc7 100755 --- a/Chameleon.xcodeproj/project.pbxproj +++ b/Chameleon.xcodeproj/project.pbxproj @@ -390,7 +390,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1220; ORGANIZATIONNAME = "Vicc Alexander"; TargetAttributes = { 0C8DABB01C07B5EA00B28FE2 = { @@ -411,7 +411,7 @@ }; buildConfigurationList = 240093F21BB4517400932727 /* Build configuration list for PBXProject "Chameleon" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -589,7 +589,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; INFOPLIST_FILE = "ChameleonDemo-Objc/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Objc"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -603,7 +603,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; INFOPLIST_FILE = "ChameleonDemo-Objc/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Objc"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -614,6 +614,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -622,14 +623,17 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -655,7 +659,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -670,6 +674,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -678,14 +683,17 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -705,7 +713,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -728,13 +736,13 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Chameleon/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.Chameleon; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -750,12 +758,12 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Chameleon/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.Chameleon; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -775,12 +783,12 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "ChameleonDemo-Swift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -801,11 +809,11 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "ChameleonDemo-Swift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -815,11 +823,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = ChameleonDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -828,11 +836,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = ChameleonDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme b/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme index a813637d..84a3ee05 100755 --- a/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme +++ b/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme @@ -1,6 +1,6 @@ - - - - 0 ? containers[0] : nil, - count > 1 ? containers[1] : nil, - count > 2 ? containers[2] : nil, - count > 3 ? containers[3] : nil, - count > 4 ? containers[4] : nil, - count > 5 ? containers[5] : nil, - count > 6 ? containers[6] : nil, - count > 7 ? containers[7] : nil, - count > 8 ? containers[8] : nil, - count > 9 ? containers[9] : nil, + return [self appearanceWhenContainedInInstancesOfClasses: + count > 0 ? containers[0]: nil]; } diff --git a/Pod/Classes/Objective-C/UIColor+Chameleon.m b/Pod/Classes/Objective-C/UIColor+Chameleon.m index 5c9ae8ae..cdc1d9e2 100755 --- a/Pod/Classes/Objective-C/UIColor+Chameleon.m +++ b/Pod/Classes/Objective-C/UIColor+Chameleon.m @@ -950,6 +950,8 @@ - (void)getRGBAComponents:(CGFloat[4])rgba { rgba[3] = 1.0f; break; } + case kCGColorSpaceModelXYZ: + break; } } diff --git a/Pod/Classes/Swift/ChameleonShorthand.swift b/Pod/Classes/Swift/ChameleonShorthand.swift index a33d633d..4609f89d 100755 --- a/Pod/Classes/Swift/ChameleonShorthand.swift +++ b/Pod/Classes/Swift/ChameleonShorthand.swift @@ -132,7 +132,7 @@ Returns a randomly generated flat color object whose alpha value is 1.0. - returns: A flat UIColor object in the HSB colorspace. */ public func RandomFlatColor() -> UIColor { - return UIColor.randomFlat + return UIColor.randomFlat() } public func ClearColor() -> UIColor { @@ -143,195 +143,195 @@ public func ClearColor() -> UIColor { // MARK: - Light Shades Shorthand public func FlatBlack() -> UIColor { - return UIColor.flatBlack + return UIColor.flatBlack() } public func FlatBlue() -> UIColor { - return UIColor.flatBlue + return UIColor.flatBlue() } public func FlatBrown() -> UIColor { - return UIColor.flatBrown + return UIColor.flatBrown() } public func FlatCoffee() -> UIColor { - return UIColor.flatCoffee + return UIColor.flatCoffee() } public func FlatForestGreen() -> UIColor { - return UIColor.flatForestGreen + return UIColor.flatForestGreen() } public func FlatGray() -> UIColor { - return UIColor.flatGray + return UIColor.flatGray() } public func FlatGreen() -> UIColor { - return UIColor.flatGreen + return UIColor.flatGreen() } public func FlatLime() -> UIColor { - return UIColor.flatLime + return UIColor.flatLime() } public func FlatMagenta() -> UIColor { - return UIColor.flatMagenta + return UIColor.flatMagenta() } public func FlatMaroon() -> UIColor { - return UIColor.flatMaroon + return UIColor.flatMaroon() } public func FlatMint() -> UIColor { - return UIColor.flatMint + return UIColor.flatMint() } public func FlatNavyBlue() -> UIColor { - return UIColor.flatNavyBlue + return UIColor.flatNavyBlue() } public func FlatOrange() -> UIColor { - return UIColor.flatOrange + return UIColor.flatOrange() } public func FlatPink() -> UIColor { - return UIColor.flatPink + return UIColor.flatPink() } public func FlatPlum() -> UIColor { - return UIColor.flatPlum + return UIColor.flatPlum() } public func FlatPowderBlue() -> UIColor { - return UIColor.flatPowderBlue + return UIColor.flatPowderBlue() } public func FlatPurple() -> UIColor { - return UIColor.flatPurple + return UIColor.flatPurple() } public func FlatRed() -> UIColor { - return UIColor.flatRed + return UIColor.flatRed() } public func FlatSand() -> UIColor { - return UIColor.flatSand + return UIColor.flatSand() } public func FlatSkyBlue() -> UIColor { - return UIColor.flatSkyBlue + return UIColor.flatSkyBlue() } public func FlatTeal() -> UIColor { - return UIColor.flatTeal + return UIColor.flatTeal() } public func FlatWatermelon() -> UIColor { - return UIColor.flatWatermelon + return UIColor.flatWatermelon() } public func FlatWhite() -> UIColor { - return UIColor.flatWhite + return UIColor.flatWhite() } public func FlatYellow() -> UIColor { - return UIColor.flatYellow + return UIColor.flatYellow() } // MARK: - Chameleon - Dark Shades Shorthand public func FlatBlackDark() -> UIColor { - return UIColor.flatBlackDark + return UIColor.flatBlackDark() } public func FlatBlueDark() -> UIColor { - return UIColor.flatBlueDark + return UIColor.flatBlueDark() } public func FlatBrownDark() -> UIColor { - return UIColor.flatBrownDark + return UIColor.flatBrownDark() } public func FlatCoffeeDark() -> UIColor { - return UIColor.flatCoffeeDark + return UIColor.flatCoffeeDark() } public func FlatForestGreenDark() -> UIColor { - return UIColor.flatForestGreenDark + return UIColor.flatForestGreenDark() } public func FlatGrayDark() -> UIColor { - return UIColor.flatGrayDark + return UIColor.flatGrayDark() } public func FlatGreenDark() -> UIColor { - return UIColor.flatGreenDark + return UIColor.flatGreenDark() } public func FlatLimeDark() -> UIColor { - return UIColor.flatLimeDark + return UIColor.flatLimeDark() } public func FlatMagentaDark() -> UIColor { - return UIColor.flatMagentaDark + return UIColor.flatMagentaDark() } public func FlatMaroonDark() -> UIColor { - return UIColor.flatMaroonDark + return UIColor.flatMaroonDark() } public func FlatMintDark() -> UIColor { - return UIColor.flatMintDark + return UIColor.flatMintDark() } public func FlatNavyBlueDark() -> UIColor { - return UIColor.flatNavyBlueDark + return UIColor.flatNavyBlueDark() } public func FlatOrangeDark() -> UIColor { - return UIColor.flatOrangeDark + return UIColor.flatOrangeDark() } public func FlatPinkDark() -> UIColor { - return UIColor.flatPinkDark + return UIColor.flatPinkDark() } public func FlatPlumDark() -> UIColor { - return UIColor.flatPlumDark + return UIColor.flatPlumDark() } public func FlatPowderBlueDark() -> UIColor { - return UIColor.flatPowderBlueDark + return UIColor.flatPowderBlueDark() } public func FlatPurpleDark() -> UIColor { - return UIColor.flatPurpleDark + return UIColor.flatPurpleDark() } public func FlatRedDark() -> UIColor { - return UIColor.flatRedDark + return UIColor.flatRedDark() } public func FlatSandDark() -> UIColor { - return UIColor.flatSandDark + return UIColor.flatSandDark() } public func FlatSkyBlueDark() -> UIColor { - return UIColor.flatSkyBlueDark + return UIColor.flatSkyBlueDark() } public func FlatTealDark() -> UIColor { - return UIColor.flatTealDark + return UIColor.flatTealDark() } public func FlatWatermelonDark() -> UIColor { - return UIColor.flatWatermelonDark + return UIColor.flatWatermelonDark() } public func FlatWhiteDark() -> UIColor { - return UIColor.flatWhiteDark + return UIColor.flatWhiteDark() } public func FlatYellowDark() -> UIColor { - return UIColor.flatYellowDark + return UIColor.flatYellowDark() }