From 4ed72aebe9dc610b92d4d607d398f381b7451a1e Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Sat, 22 Sep 2018 17:09:21 +0200 Subject: [PATCH] swift 4.2 --- .swift-version | 2 +- DemoApp/DemoApp.xcodeproj/project.pbxproj | 22 ++++++++++++++++--- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++++++ DemoApp/DemoApp/AppDelegate.swift | 8 +++---- .../DemoApp/DemoChainsViewController.swift | 2 +- EasyAnimation.podspec | 2 +- 6 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 DemoApp/DemoApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.swift-version b/.swift-version index 9f55b2c..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.2 diff --git a/DemoApp/DemoApp.xcodeproj/project.pbxproj b/DemoApp/DemoApp.xcodeproj/project.pbxproj index e76c2c8..68f69e2 100644 --- a/DemoApp/DemoApp.xcodeproj/project.pbxproj +++ b/DemoApp/DemoApp.xcodeproj/project.pbxproj @@ -156,7 +156,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0820; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Underplot ltd."; TargetAttributes = { 9C2C93C01ADBC44400C56262 = { @@ -244,14 +244,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 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_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -291,14 +299,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 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_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -330,7 +346,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.underplot.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -343,7 +359,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.underplot.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/DemoApp/DemoApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DemoApp/DemoApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DemoApp/DemoApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DemoApp/DemoApp/AppDelegate.swift b/DemoApp/DemoApp/AppDelegate.swift index 0204ceb..1f51673 100644 --- a/DemoApp/DemoApp/AppDelegate.swift +++ b/DemoApp/DemoApp/AppDelegate.swift @@ -17,8 +17,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { - EasyAnimation.enable() - return true - } + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + EasyAnimation.enable() + return true + } } diff --git a/DemoApp/DemoApp/DemoChainsViewController.swift b/DemoApp/DemoApp/DemoChainsViewController.swift index b3c9681..8dc0ff1 100644 --- a/DemoApp/DemoApp/DemoChainsViewController.swift +++ b/DemoApp/DemoApp/DemoChainsViewController.swift @@ -63,7 +63,7 @@ class DemoChainsViewController: UIViewController { @IBAction func actionCancelSequence(_ sender: AnyObject) { if let sender = sender as? UIButton { - sender.setTitle("Cancelled", for: UIControlState()) + sender.setTitle("Cancelled", for: UIControl.State()) sender.isEnabled = false } diff --git a/EasyAnimation.podspec b/EasyAnimation.podspec index 6c8a321..a4705e4 100644 --- a/EasyAnimation.podspec +++ b/EasyAnimation.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "EasyAnimation" - s.version = "2.0.2" + s.version = "2.2" s.summary = "A Swift library to take the power of UIView.animateWithDuration(_:, animations:...) to a whole new level!" s.description = <<-DESC EasyAnimation extends the animation methods that are built-in in UIKit and allows you to: