From 0a37fa7c08a1f04e16b42ca48afbb062e13a1fbc Mon Sep 17 00:00:00 2001 From: Robert Bell Date: Wed, 15 Jun 2016 07:57:00 -0700 Subject: [PATCH 1/3] Charts changes for Swift 2.3 --- Charts/Charts.xcodeproj/project.pbxproj | 25 ++++++++++++++++--- .../xcschemes/Charts-OSX.xcscheme | 2 +- .../xcshareddata/xcschemes/Charts-TV.xcscheme | 2 +- .../xcschemes/Charts-iOS.xcscheme | 2 +- Charts/Classes/Charts/ChartViewBase.swift | 8 +++--- .../Renderers/ScatterChartRenderer.swift | 4 +-- Charts/Classes/Utils/ChartFill.swift | 14 +++++------ Charts/Classes/Utils/ChartPlatform.swift | 4 +-- 8 files changed, 40 insertions(+), 21 deletions(-) diff --git a/Charts/Charts.xcodeproj/project.pbxproj b/Charts/Charts.xcodeproj/project.pbxproj index de73c217be..9ea9b7ac02 100644 --- a/Charts/Charts.xcodeproj/project.pbxproj +++ b/Charts/Charts.xcodeproj/project.pbxproj @@ -953,20 +953,29 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = dcg; TargetAttributes = { 06AEE7A11BDC3F8B009875AE = { CreatedOnToolsVersion = 7.1; + DevelopmentTeam = 4ZBD65B36X; + DevelopmentTeamName = "Robert Bell"; + LastSwiftMigration = 0800; }; 5BA8EC3F1A9D14DC00CE82E1 = { CreatedOnToolsVersion = 6.1.1; + DevelopmentTeam = 4ZBD65B36X; + DevelopmentTeamName = "Robert Bell"; + LastSwiftMigration = 0800; }; 65B3F5BE1C7370BE000983D0 = { CreatedOnToolsVersion = 7.2.1; + ProvisioningStyle = Automatic; }; A52C5C361BAC5CA400594CDD = { CreatedOnToolsVersion = 7.1; + DevelopmentTeam = 4ZBD65B36X; + DevelopmentTeamName = "Robert Bell"; }; }; }; @@ -1417,6 +1426,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.pierremarcairoldi.ChartsTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -1436,6 +1446,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.pierremarcairoldi.ChartsTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 2.3; }; name = Release; }; @@ -1463,6 +1475,7 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -1509,6 +1522,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -1543,6 +1557,7 @@ PRODUCT_NAME = Charts; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -1563,13 +1578,15 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Charts; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 2.3; }; name = Release; }; 65B3F5C51C7370BE000983D0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1590,7 +1607,7 @@ 65B3F5C61C7370BE000983D0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DEFINES_MODULE = YES; @@ -1606,6 +1623,7 @@ PRODUCT_NAME = Charts; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; }; name = Release; }; @@ -1650,6 +1668,7 @@ PRODUCT_NAME = Charts; SDKROOT = appletvos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; diff --git a/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme b/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme index 47d0c38223..4a4b5b1246 100644 --- a/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme +++ b/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme @@ -1,6 +1,6 @@ ?, withEvent event: NSUIEvent?) + public final override func touchesCancelled(touches: Set, withEvent event: NSUIEvent?) { self.nsuiTouchesCancelled(touches, withEvent: event) } @@ -130,7 +130,7 @@ types are aliased to either their UI* implementation (on iOS) or their NS* imple public func nsuiTouchesCancelled(touches: Set?, withEvent event: NSUIEvent?) { - super.touchesCancelled(touches, withEvent: event!) + super.touchesCancelled(touches!, withEvent: event!) } var nsuiLayer: CALayer? From 8d1acf96efb96808f0346b81cdc8d44dc0877dee Mon Sep 17 00:00:00 2001 From: Robert Bell Date: Thu, 16 Jun 2016 09:18:01 -0700 Subject: [PATCH 2/3] removed project.pbxproj settings --- Charts/Charts.xcodeproj/project.pbxproj | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Charts/Charts.xcodeproj/project.pbxproj b/Charts/Charts.xcodeproj/project.pbxproj index 9ea9b7ac02..c3cf8cd3c6 100644 --- a/Charts/Charts.xcodeproj/project.pbxproj +++ b/Charts/Charts.xcodeproj/project.pbxproj @@ -958,24 +958,15 @@ TargetAttributes = { 06AEE7A11BDC3F8B009875AE = { CreatedOnToolsVersion = 7.1; - DevelopmentTeam = 4ZBD65B36X; - DevelopmentTeamName = "Robert Bell"; - LastSwiftMigration = 0800; }; 5BA8EC3F1A9D14DC00CE82E1 = { CreatedOnToolsVersion = 6.1.1; - DevelopmentTeam = 4ZBD65B36X; - DevelopmentTeamName = "Robert Bell"; - LastSwiftMigration = 0800; }; 65B3F5BE1C7370BE000983D0 = { CreatedOnToolsVersion = 7.2.1; - ProvisioningStyle = Automatic; }; A52C5C361BAC5CA400594CDD = { CreatedOnToolsVersion = 7.1; - DevelopmentTeam = 4ZBD65B36X; - DevelopmentTeamName = "Robert Bell"; }; }; }; @@ -1586,7 +1577,7 @@ 65B3F5C51C7370BE000983D0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1607,7 +1598,7 @@ 65B3F5C61C7370BE000983D0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DEFINES_MODULE = YES; From 77fe65531a8ed67475f9d532c0edcd5bcbaf0741 Mon Sep 17 00:00:00 2001 From: Robert Bell Date: Thu, 16 Jun 2016 09:18:01 -0700 Subject: [PATCH 3/3] removed project.pbxproj settings --- Charts/Charts.xcodeproj/project.pbxproj | 15 +++------------ .../xcshareddata/xcschemes/Charts-OSX.xcscheme | 2 +- .../xcshareddata/xcschemes/Charts-TV.xcscheme | 2 +- .../xcshareddata/xcschemes/Charts-iOS.xcscheme | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Charts/Charts.xcodeproj/project.pbxproj b/Charts/Charts.xcodeproj/project.pbxproj index 9ea9b7ac02..37e91a8ed9 100644 --- a/Charts/Charts.xcodeproj/project.pbxproj +++ b/Charts/Charts.xcodeproj/project.pbxproj @@ -953,29 +953,20 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = dcg; TargetAttributes = { 06AEE7A11BDC3F8B009875AE = { CreatedOnToolsVersion = 7.1; - DevelopmentTeam = 4ZBD65B36X; - DevelopmentTeamName = "Robert Bell"; - LastSwiftMigration = 0800; }; 5BA8EC3F1A9D14DC00CE82E1 = { CreatedOnToolsVersion = 6.1.1; - DevelopmentTeam = 4ZBD65B36X; - DevelopmentTeamName = "Robert Bell"; - LastSwiftMigration = 0800; }; 65B3F5BE1C7370BE000983D0 = { CreatedOnToolsVersion = 7.2.1; - ProvisioningStyle = Automatic; }; A52C5C361BAC5CA400594CDD = { CreatedOnToolsVersion = 7.1; - DevelopmentTeam = 4ZBD65B36X; - DevelopmentTeamName = "Robert Bell"; }; }; }; @@ -1586,7 +1577,7 @@ 65B3F5C51C7370BE000983D0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1607,7 +1598,7 @@ 65B3F5C61C7370BE000983D0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DEFINES_MODULE = YES; diff --git a/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme b/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme index 4a4b5b1246..47d0c38223 100644 --- a/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme +++ b/Charts/Charts.xcodeproj/xcshareddata/xcschemes/Charts-OSX.xcscheme @@ -1,6 +1,6 @@