From d81e614d1b7571d005e0f5d473feb0e48f333602 Mon Sep 17 00:00:00 2001 From: Brent Whitman Date: Fri, 13 Jul 2018 13:31:32 -0700 Subject: [PATCH] Update to Swift 4.2 --- .swift-version | 2 +- GMStepper.podspec | 7 ++++--- GMStepper/GMStepper.swift | 2 +- .../GMStepperExample.xcodeproj/project.pbxproj | 16 ++++++---------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ .../GMStepperExample/AppDelegate.swift | 2 +- 6 files changed, 21 insertions(+), 16 deletions(-) create mode 100644 GMStepperExample/GMStepperExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.swift-version b/.swift-version index 389f774..8012ebb 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 \ No newline at end of file +4.2 \ No newline at end of file diff --git a/GMStepper.podspec b/GMStepper.podspec index 850c67e..105e869 100644 --- a/GMStepper.podspec +++ b/GMStepper.podspec @@ -1,14 +1,15 @@ Pod::Spec.new do |s| s.name = "GMStepper" - s.version = "2.1" + s.version = "2.2" s.summary = "A stepper with a sliding label in the middle." s.homepage = "https://github.com/gmertk/GMStepper" s.screenshots = "https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif" s.license = 'MIT' - s.author = { "Gunay Mert Karadogan" => "mertkaradogan@gmail.com" } + s.authors = { "Gunay Mert Karadogan" => "mertkaradogan@gmail.com", + "Brent Whitman" => "brent@pathym.com" } s.source = { :git => "https://github.com/gmertk/GMStepper.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/gunaymertk' - s.platform = :ios, '8.0' + s.platform = :ios, '8.4' s.requires_arc = true s.source_files = 'GMStepper/*.swift' end diff --git a/GMStepper/GMStepper.swift b/GMStepper/GMStepper.swift index 7d120e5..38be4dd 100644 --- a/GMStepper/GMStepper.swift +++ b/GMStepper/GMStepper.swift @@ -303,7 +303,7 @@ import UIKit setupNumberFormatter() - NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: UIApplication.willResignActiveNotification, object: nil) } func setupNumberFormatter() { diff --git a/GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj b/GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj index d0d1bce..481dfd0 100644 --- a/GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj +++ b/GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj @@ -168,14 +168,14 @@ TargetAttributes = { 3116C0D71DA4DD360015AC69 = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; TestTargetID = 319C19311B4843EB005EFEE5; }; 319C19311B4843EB005EFEE5 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = 289M6XEDV4; - LastSwiftMigration = 0900; + LastSwiftMigration = 1000; }; }; }; @@ -282,8 +282,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.gmertk.GMStepperExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample"; }; name = Debug; @@ -300,8 +299,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.gmertk.GMStepperExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample"; }; name = Release; @@ -414,8 +412,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -428,8 +425,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/GMStepperExample/GMStepperExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GMStepperExample/GMStepperExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/GMStepperExample/GMStepperExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/GMStepperExample/GMStepperExample/AppDelegate.swift b/GMStepperExample/GMStepperExample/AppDelegate.swift index bdb5a84..3fd6cb5 100644 --- a/GMStepperExample/GMStepperExample/AppDelegate.swift +++ b/GMStepperExample/GMStepperExample/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true }