From 39c58b7f81af6b70ce8f3c7046f0200bdc831450 Mon Sep 17 00:00:00 2001 From: Marcos Griselli Date: Mon, 24 Sep 2018 11:32:57 -0300 Subject: [PATCH] Swift 4.2 migration --- Example/Pods/Pods.xcodeproj/project.pbxproj | 11 +++++++++-- Example/ViewAnimator.xcodeproj/project.pbxproj | 16 ++++++---------- Example/ViewAnimator/AppDelegate.swift | 2 +- .../ViewControllers/TableViewController.swift | 2 +- README.md | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 0b5b64b..5fbc94e 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -518,6 +518,11 @@ attributes = { LastSwiftUpdateCheck = 0930; LastUpgradeCheck = 0940; + TargetAttributes = { + A3FC59CAEDE2B4A6FAFA4CAFFBA80A8C = { + LastSwiftMigration = 1000; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -676,6 +681,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; TVOS_DEPLOYMENT_TARGET = 11.3; }; @@ -706,7 +712,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -839,7 +845,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.1; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1042,6 +1048,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; TVOS_DEPLOYMENT_TARGET = 11.3; }; diff --git a/Example/ViewAnimator.xcodeproj/project.pbxproj b/Example/ViewAnimator.xcodeproj/project.pbxproj index 792788d..f9ec3d3 100644 --- a/Example/ViewAnimator.xcodeproj/project.pbxproj +++ b/Example/ViewAnimator.xcodeproj/project.pbxproj @@ -337,12 +337,12 @@ 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = 8PC4X7QUY9; - LastSwiftMigration = 0910; + LastSwiftMigration = 1000; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = 8PC4X7QUY9; - LastSwiftMigration = 0910; + LastSwiftMigration = 1000; TestTargetID = 607FACCF1AFB9204008FA782; }; FBFFC9B120950FEB00DFF96B = { @@ -679,8 +679,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -695,8 +694,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -717,8 +715,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ViewAnimator_Example.app/ViewAnimator_Example"; }; name = Debug; @@ -736,8 +733,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ViewAnimator_Example.app/ViewAnimator_Example"; }; name = Release; diff --git a/Example/ViewAnimator/AppDelegate.swift b/Example/ViewAnimator/AppDelegate.swift index 69a37a0..86d6bad 100644 --- a/Example/ViewAnimator/AppDelegate.swift +++ b/Example/ViewAnimator/AppDelegate.swift @@ -13,7 +13,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 } diff --git a/Example/ViewAnimator/ViewControllers/TableViewController.swift b/Example/ViewAnimator/ViewControllers/TableViewController.swift index 089c7bc..b00d02c 100644 --- a/Example/ViewAnimator/ViewControllers/TableViewController.swift +++ b/Example/ViewAnimator/ViewControllers/TableViewController.swift @@ -12,7 +12,7 @@ import ViewAnimator class TableViewController: UITableViewController { private var items = [Any?]() - private let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray) + private let activityIndicator = UIActivityIndicatorView(style: .gray) private let animations = [AnimationType.from(direction: .bottom, offset: 30.0)] override func viewDidLoad() { diff --git a/README.md b/README.md index b819d34..dbd4903 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

- +