From b9cabaa4369d2f821760677bfa50311cf74ff940 Mon Sep 17 00:00:00 2001 From: horex Date: Wed, 18 Oct 2017 14:57:42 +0800 Subject: [PATCH 1/6] convert to swift 4 --- .../RazzleDazzle.xcodeproj/project.pbxproj | 24 +++++++++++++++---- .../xcschemes/RazzleDazzle.xcscheme | 4 +++- Source/RotationAnimation.swift | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Example/RazzleDazzle.xcodeproj/project.pbxproj b/Example/RazzleDazzle.xcodeproj/project.pbxproj index f8f567f..61f3b15 100644 --- a/Example/RazzleDazzle.xcodeproj/project.pbxproj +++ b/Example/RazzleDazzle.xcodeproj/project.pbxproj @@ -284,7 +284,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = IFTTT; TargetAttributes = { FACD9C5C1B2A554100AC1614 = { @@ -402,14 +402,20 @@ 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_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_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; @@ -438,6 +444,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -452,14 +459,20 @@ 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_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_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; @@ -480,6 +493,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -506,7 +520,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -528,7 +542,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -548,7 +562,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -564,7 +578,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme index bd81817..e4f17e4 100644 --- a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme +++ b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme @@ -1,6 +1,6 @@ @@ -70,6 +71,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Source/RotationAnimation.swift b/Source/RotationAnimation.swift index 57e9d4d..096e9b3 100644 --- a/Source/RotationAnimation.swift +++ b/Source/RotationAnimation.swift @@ -21,7 +21,7 @@ public class RotationAnimation : Animation, Animatable { public func animate(_ time: CGFloat) { if !hasKeyframes() {return} let degrees = self[time] - let radians = degrees * CGFloat(M_PI / -180.0) + let radians = degrees * CGFloat(Double.pi / -180.0) let rotationTransform = CGAffineTransform(rotationAngle: radians) view.rotationTransform = rotationTransform var newTransform = rotationTransform From 9d7569f31791b99844a2d6b4ec0616ddd8dfa817 Mon Sep 17 00:00:00 2001 From: Suric Date: Wed, 6 Dec 2017 14:04:35 +0800 Subject: [PATCH 2/6] update for iPhoneX --- .../AppIcon.appiconset/Contents.json | 25 +++++++++++++++++++ .../RazzleDazzleDemo/ViewController.swift | 13 ++++++++-- .../AnimatedPagingScrollViewController.swift | 18 ++++++++++--- 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/Example/Example/RazzleDazzleDemo/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/RazzleDazzleDemo/Images.xcassets/AppIcon.appiconset/Contents.json index 33ec0bc..19882d5 100644 --- a/Example/Example/RazzleDazzleDemo/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/Example/RazzleDazzleDemo/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,15 +1,35 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "60x60", @@ -19,6 +39,11 @@ "idiom" : "iphone", "size" : "60x60", "scale" : "3x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Example/Example/RazzleDazzleDemo/ViewController.swift b/Example/Example/RazzleDazzleDemo/ViewController.swift index 126f841..9f416e9 100644 --- a/Example/Example/RazzleDazzleDemo/ViewController.swift +++ b/Example/Example/RazzleDazzleDemo/ViewController.swift @@ -98,7 +98,11 @@ class ViewController: AnimatedPagingScrollViewController { private func configureIFTTTPresents() { // Keep IFTTTPresents centered on pages 0 and 1, offset 20 pixels down from the top of the view - NSLayoutConstraint(item: iftttPresents, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1, constant: 20).isActive = true + if #available(iOS 11.0, *) { + NSLayoutConstraint(item: iftttPresents, attribute: .top, relatedBy: .equal, toItem: contentView.safeAreaLayoutGuide, attribute: .top, multiplier: 1, constant: 20).isActive = true + } else { + NSLayoutConstraint(item: iftttPresents, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1, constant: 20).isActive = true + } keepView(iftttPresents, onPages: [0,1]) // Hide IFTTTPresents when we get to page 1 @@ -242,7 +246,12 @@ class ViewController: AnimatedPagingScrollViewController { } private func configureSun() { - let sunVerticalConstraint = NSLayoutConstraint(item: sun, attribute: .centerY, relatedBy: .equal, toItem: scrollView, attribute: .top, multiplier: 1, constant: 0) + let sunVerticalConstraint: NSLayoutConstraint + if #available(iOS 11.0, *) { + sunVerticalConstraint = NSLayoutConstraint(item: sun, attribute: .centerY, relatedBy: .equal, toItem: scrollView.safeAreaLayoutGuide, attribute: .top, multiplier: 1, constant: 0) + } else { + sunVerticalConstraint = NSLayoutConstraint(item: sun, attribute: .centerY, relatedBy: .equal, toItem: scrollView, attribute: .top, multiplier: 1, constant: 0) + } sunVerticalConstraint.isActive = true // Move the sun from the right side to the left side between pages 2.5 and 3 diff --git a/Source/AnimatedPagingScrollViewController.swift b/Source/AnimatedPagingScrollViewController.swift index 958ddd2..d5b6547 100644 --- a/Source/AnimatedPagingScrollViewController.swift +++ b/Source/AnimatedPagingScrollViewController.swift @@ -47,8 +47,16 @@ open class AnimatedPagingScrollViewController : UIViewController, UIScrollViewDe scrollView.translatesAutoresizingMaskIntoConstraints = false contentView.translatesAutoresizingMaskIntoConstraints = false - NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "H:|[scrollView]|", options: [], metrics: nil, views: ["scrollView" : scrollView])) - NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "V:|[scrollView]|", options: [], metrics: nil, views: ["scrollView" : scrollView])) + + if #available(iOS 11.0, *) { + scrollView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + scrollView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true + scrollView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true + scrollView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor).isActive = true + } else { + NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "H:|[scrollView]|", options: [], metrics: nil, views: ["scrollView" : scrollView])) + NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "V:|[scrollView]|", options: [], metrics: nil, views: ["scrollView" : scrollView])) + } let scrollViewLeft = NSLayoutConstraint(item: scrollView, attribute: .left, relatedBy: .equal, toItem: contentView, attribute: .left, multiplier: 1, constant: 0) let scrollViewRight = NSLayoutConstraint(item: scrollView, attribute: .right, relatedBy: .equal, toItem: contentView, attribute: .right, multiplier: 1, constant: 0) @@ -58,7 +66,7 @@ open class AnimatedPagingScrollViewController : UIViewController, UIScrollViewDe NSLayoutConstraint.activate([scrollViewLeft, scrollViewRight, scrollViewTop, scrollViewBottom]) let contentViewWidth = NSLayoutConstraint(item: contentView, attribute: .width, relatedBy: .equal, toItem: view, attribute: .width, multiplier: CGFloat(numberOfPages()), constant: 0) - let contentViewHeight = NSLayoutConstraint(item: contentView, attribute: .height, relatedBy: .equal, toItem: view, attribute: .height, multiplier: 1, constant: 0) + let contentViewHeight = NSLayoutConstraint(item: contentView, attribute: .height, relatedBy: .equal, toItem: scrollView, attribute: .height, multiplier: 1, constant: 0) NSLayoutConstraint.activate([contentViewWidth, contentViewHeight]) } @@ -66,6 +74,10 @@ open class AnimatedPagingScrollViewController : UIViewController, UIScrollViewDe open override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) animateCurrentFrame() + + if #available(iOS 11.0, *) { + scrollView.contentSize = CGSize(width: CGFloat(numberOfPages()) * view.frame.width, height: view.frame.height - view.safeAreaInsets.top - view.safeAreaInsets.bottom) + } } open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { From 22c748fc6325f030bb22a195214a85866da43604 Mon Sep 17 00:00:00 2001 From: horex Date: Mon, 9 Apr 2018 16:17:05 +0800 Subject: [PATCH 3/6] support swift 4.1 --- .../project.pbxproj | 22 ++++++++++++++++--- .../RazzleDazzleDemo/AppDelegate.swift | 5 ++--- .../RazzleDazzle.xcodeproj/project.pbxproj | 6 ++++- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++++++ .../xcschemes/RazzleDazzle.xcscheme | 8 +++---- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++++++ 6 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 Example/RazzleDazzle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Example/RazzleDazzle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj b/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj index 7fdee18..2e3a94d 100644 --- a/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj +++ b/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj @@ -177,7 +177,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = IFTTT; TargetAttributes = { FAD1C7471B2F57D60053D880 = { @@ -287,14 +287,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; @@ -334,14 +342,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; @@ -375,7 +391,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -389,7 +405,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Example/Example/RazzleDazzleDemo/AppDelegate.swift b/Example/Example/RazzleDazzleDemo/AppDelegate.swift index 7306fd1..4643c04 100644 --- a/Example/Example/RazzleDazzleDemo/AppDelegate.swift +++ b/Example/Example/RazzleDazzleDemo/AppDelegate.swift @@ -13,9 +13,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - // Override point for customization after application launch. + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + return true } diff --git a/Example/RazzleDazzle.xcodeproj/project.pbxproj b/Example/RazzleDazzle.xcodeproj/project.pbxproj index 61f3b15..a719c0f 100644 --- a/Example/RazzleDazzle.xcodeproj/project.pbxproj +++ b/Example/RazzleDazzle.xcodeproj/project.pbxproj @@ -284,7 +284,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = IFTTT; TargetAttributes = { FACD9C5C1B2A554100AC1614 = { @@ -406,12 +406,14 @@ 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; @@ -463,12 +465,14 @@ 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; diff --git a/Example/RazzleDazzle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/RazzleDazzle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/RazzleDazzle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme index e4f17e4..e5b8f3a 100644 --- a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme +++ b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -71,7 +70,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Example/RazzleDazzle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/RazzleDazzle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/RazzleDazzle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From dee78c876a94a0c03d5bef60fcaef3b1d4f71a02 Mon Sep 17 00:00:00 2001 From: horex Date: Wed, 26 Sep 2018 15:43:49 +0800 Subject: [PATCH 4/6] feature: support swift4.2 --- Example/Cartfile.resolved | 4 ++-- .../Example/RazzleDazzleDemo.xcodeproj/project.pbxproj | 4 ++-- Example/Example/RazzleDazzleDemo/AppDelegate.swift | 2 +- Example/Example/RazzleDazzleDemo/ViewController.swift | 2 +- Example/RazzleDazzle.xcodeproj/project.pbxproj | 10 +++++----- Example/RazzleDazzleTests/RAZAnimationSpec.swift | 2 +- .../RazzleDazzleTests/RAZRotationAnimationSpec.swift | 4 ++-- Source/AnimatedPagingScrollViewController.swift | 8 ++++---- Source/CubicBezier.swift | 2 +- Source/LayerStrokeEndAnimation.swift | 4 ++-- Source/LayerStrokeStartAnimation.swift | 4 ++-- Source/PathPositionAnimation.swift | 10 +++++----- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Example/Cartfile.resolved b/Example/Cartfile.resolved index 06a76c1..070032e 100644 --- a/Example/Cartfile.resolved +++ b/Example/Cartfile.resolved @@ -1,2 +1,2 @@ -github "Quick/Nimble" "v5.0.0" -github "Quick/Quick" "v0.10.0" +github "Quick/Nimble" "v7.3.1" +github "Quick/Quick" "v1.3.2" diff --git a/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj b/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj index 2e3a94d..f5aba61 100644 --- a/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj +++ b/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj @@ -391,7 +391,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -405,7 +405,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Example/Example/RazzleDazzleDemo/AppDelegate.swift b/Example/Example/RazzleDazzleDemo/AppDelegate.swift index 4643c04..f8a907f 100644 --- a/Example/Example/RazzleDazzleDemo/AppDelegate.swift +++ b/Example/Example/RazzleDazzleDemo/AppDelegate.swift @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { return true } diff --git a/Example/Example/RazzleDazzleDemo/ViewController.swift b/Example/Example/RazzleDazzleDemo/ViewController.swift index 9f416e9..1a007b1 100644 --- a/Example/Example/RazzleDazzleDemo/ViewController.swift +++ b/Example/Example/RazzleDazzleDemo/ViewController.swift @@ -323,7 +323,7 @@ class ViewController: AnimatedPagingScrollViewController { shapeLayer.lineWidth = 4 shapeLayer.miterLimit = 4 shapeLayer.fillColor = nil - shapeLayer.fillRule = kCAFillRuleEvenOdd + shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd return shapeLayer } diff --git a/Example/RazzleDazzle.xcodeproj/project.pbxproj b/Example/RazzleDazzle.xcodeproj/project.pbxproj index a719c0f..d6e7f2e 100644 --- a/Example/RazzleDazzle.xcodeproj/project.pbxproj +++ b/Example/RazzleDazzle.xcodeproj/project.pbxproj @@ -295,7 +295,7 @@ FACD9C671B2A554100AC1614 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeamName = "Raphael Cruzeiro (Personal Team)"; - LastSwiftMigration = 0800; + LastSwiftMigration = 1000; }; }; }; @@ -524,7 +524,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -546,7 +546,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -566,7 +566,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -582,7 +582,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Example/RazzleDazzleTests/RAZAnimationSpec.swift b/Example/RazzleDazzleTests/RAZAnimationSpec.swift index e56068f..c89907a 100644 --- a/Example/RazzleDazzleTests/RAZAnimationSpec.swift +++ b/Example/RazzleDazzleTests/RAZAnimationSpec.swift @@ -42,7 +42,7 @@ class AnimationSpec: QuickSpec { animator.addAnimation(translationAnimation) let scaleTransform = CGAffineTransform(scaleX: 3, y: 3) - let rotationTransform = CGAffineTransform(rotationAngle: 90 * CGFloat(M_PI / -180.0)) + let rotationTransform = CGAffineTransform(rotationAngle: 90 * CGFloat(Double.pi / -180.0)) let translationTransform = CGAffineTransform(translationX: 5, y: 15) mixedTransform = translationTransform.concatenating(scaleTransform.concatenating(rotationTransform)) diff --git a/Example/RazzleDazzleTests/RAZRotationAnimationSpec.swift b/Example/RazzleDazzleTests/RAZRotationAnimationSpec.swift index 5fb5084..5d33fe6 100644 --- a/Example/RazzleDazzleTests/RAZRotationAnimationSpec.swift +++ b/Example/RazzleDazzleTests/RAZRotationAnimationSpec.swift @@ -50,8 +50,8 @@ class RotationAnimationSpec: QuickSpec { it("should apply changes to the view's rotation transform") { animation[1] = 3 animation[3] = 5 - let radiansOne = 3 * CGFloat(M_PI / -180.0) - let radiansThree = 5 * CGFloat(M_PI / -180.0) + let radiansOne = 3 * CGFloat(Double.pi / -180.0) + let radiansThree = 5 * CGFloat(Double.pi / -180.0) animation.animate(1) expect(view.transform == CGAffineTransform(rotationAngle: radiansOne)).to(beTruthy()) animation.animate(3) diff --git a/Source/AnimatedPagingScrollViewController.swift b/Source/AnimatedPagingScrollViewController.swift index d5b6547..a0d55d3 100644 --- a/Source/AnimatedPagingScrollViewController.swift +++ b/Source/AnimatedPagingScrollViewController.swift @@ -12,8 +12,8 @@ import UIKit View controller for creating scrolling app intros. Set animation times based on the page number, and this view controller handles calling `animate:` on the `animator`. */ open class AnimatedPagingScrollViewController : UIViewController, UIScrollViewDelegate { - open let scrollView = UIScrollView() - open let contentView = UIView() + public let scrollView = UIScrollView() + public let contentView = UIView() open var animator = Animator() private var scrollViewPageConstraintAnimations = [ScrollViewPageConstraintAnimation]() open var pageWidth : CGFloat { @@ -161,8 +161,8 @@ open class AnimatedPagingScrollViewController : UIViewController, UIScrollViewDe return 2.0 * (offset + page) / CGFloat(numberOfPages()) } - open func layoutAttributeFromRazAttribute(_ razAttribute: HorizontalPositionAttribute) -> NSLayoutAttribute { - var attribute : NSLayoutAttribute + open func layoutAttributeFromRazAttribute(_ razAttribute: HorizontalPositionAttribute) -> NSLayoutConstraint.Attribute { + var attribute : NSLayoutConstraint.Attribute switch razAttribute { case .centerX: attribute = .centerX diff --git a/Source/CubicBezier.swift b/Source/CubicBezier.swift index c2e7f4e..f6f6f4f 100644 --- a/Source/CubicBezier.swift +++ b/Source/CubicBezier.swift @@ -60,7 +60,7 @@ private func CubicBezierBinarySubdivide(_ x: CGFloat, x1: CGFloat, x2: CGFloat) start = currentT } i += 1 - } while (fabs(currentX) > epsilon && i < maxIterations) + } while (abs(currentX) > epsilon && i < maxIterations) return currentT } diff --git a/Source/LayerStrokeEndAnimation.swift b/Source/LayerStrokeEndAnimation.swift index bd89f26..3f3ea04 100644 --- a/Source/LayerStrokeEndAnimation.swift +++ b/Source/LayerStrokeEndAnimation.swift @@ -25,7 +25,7 @@ public class LayerStrokeEndAnimation : Animation, Animatable { NotificationCenter.default.addObserver( self, selector: #selector(LayerStrokeEndAnimation.createStrokeEndAnimation), - name: NSNotification.Name.UIApplicationDidBecomeActive, + name: UIApplication.didBecomeActiveNotification, object: nil) } @@ -54,7 +54,7 @@ public class LayerStrokeEndAnimation : Animation, Animatable { animation.duration = 1 animation.fromValue = 0 animation.toValue = 1 - animation.fillMode = kCAFillModeBoth + animation.fillMode = CAMediaTimingFillMode.both animation.isRemovedOnCompletion = false return animation } diff --git a/Source/LayerStrokeStartAnimation.swift b/Source/LayerStrokeStartAnimation.swift index 42ef7b5..6b140ad 100644 --- a/Source/LayerStrokeStartAnimation.swift +++ b/Source/LayerStrokeStartAnimation.swift @@ -24,7 +24,7 @@ public class LayerStrokeStartAnimation : Animation, Animatable { NotificationCenter.default.addObserver( self, selector: #selector(LayerStrokeStartAnimation.createStrokeStartAnimation), - name: NSNotification.Name.UIApplicationDidBecomeActive, + name: UIApplication.didBecomeActiveNotification, object: nil) } @@ -53,7 +53,7 @@ public class LayerStrokeStartAnimation : Animation, Animatable { animation.duration = 1 animation.fromValue = 0 animation.toValue = 1 - animation.fillMode = kCAFillModeBoth + animation.fillMode = CAMediaTimingFillMode.both animation.isRemovedOnCompletion = false return animation } diff --git a/Source/PathPositionAnimation.swift b/Source/PathPositionAnimation.swift index b8ee893..4bdc71d 100644 --- a/Source/PathPositionAnimation.swift +++ b/Source/PathPositionAnimation.swift @@ -19,7 +19,7 @@ public class PathPositionAnimation : Animation, Animatable { } } private let animationKey = "PathPosition" - public var rotationMode : String? = kCAAnimationRotateAuto { + public var rotationMode : String? = CAAnimationRotationMode.rotateAuto.rawValue { didSet { createKeyframeAnimation() } @@ -35,7 +35,7 @@ public class PathPositionAnimation : Animation, Animatable { NotificationCenter.default.addObserver( self, selector: #selector(PathPositionAnimation.createKeyframeAnimation), - name: NSNotification.Name.UIApplicationDidBecomeActive, + name: UIApplication.didBecomeActiveNotification, object: nil) } @@ -66,9 +66,9 @@ public class PathPositionAnimation : Animation, Animatable { animation.duration = 1 animation.isAdditive = true animation.repeatCount = Float.infinity - animation.calculationMode = kCAAnimationPaced - animation.rotationMode = rotationMode - animation.fillMode = kCAFillModeBoth + animation.calculationMode = CAAnimationCalculationMode.paced + animation.rotationMode = rotationMode.map { CAAnimationRotationMode(rawValue: $0) } + animation.fillMode = CAMediaTimingFillMode.both animation.isRemovedOnCompletion = false return animation } From 8b870e262ed264c248a3510ffff59c1f7089063a Mon Sep 17 00:00:00 2001 From: bruce Date: Mon, 8 Apr 2019 16:23:35 +0800 Subject: [PATCH 5/6] feature: support swift5 --- Example/Cartfile.resolved | 4 ++-- .../project.pbxproj | 16 ++++++++------ .../RazzleDazzle.xcodeproj/project.pbxproj | 21 +++++++++++-------- .../xcschemes/RazzleDazzle.xcscheme | 2 +- Source/UIView+Transform.swift | 6 +++--- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/Example/Cartfile.resolved b/Example/Cartfile.resolved index 070032e..2bbbe22 100644 --- a/Example/Cartfile.resolved +++ b/Example/Cartfile.resolved @@ -1,2 +1,2 @@ -github "Quick/Nimble" "v7.3.1" -github "Quick/Quick" "v1.3.2" +github "Quick/Nimble" "v8.0.1" +github "Quick/Quick" "v2.0.0" diff --git a/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj b/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj index f5aba61..829feba 100644 --- a/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj +++ b/Example/Example/RazzleDazzleDemo.xcodeproj/project.pbxproj @@ -177,7 +177,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = IFTTT; TargetAttributes = { FAD1C7471B2F57D60053D880 = { @@ -194,7 +194,7 @@ }; buildConfigurationList = FAD1C7431B2F57D60053D880 /* Build configuration list for PBXProject "RazzleDazzleDemo" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -283,6 +283,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; @@ -331,6 +332,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -338,6 +340,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; @@ -378,6 +381,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -391,7 +395,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -405,7 +409,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -426,7 +430,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RazzleDazzleDemo.app/RazzleDazzleDemo"; }; name = Debug; @@ -443,7 +447,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RazzleDazzleDemo.app/RazzleDazzleDemo"; }; name = Release; diff --git a/Example/RazzleDazzle.xcodeproj/project.pbxproj b/Example/RazzleDazzle.xcodeproj/project.pbxproj index d6e7f2e..1afde9f 100644 --- a/Example/RazzleDazzle.xcodeproj/project.pbxproj +++ b/Example/RazzleDazzle.xcodeproj/project.pbxproj @@ -284,7 +284,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = IFTTT; TargetAttributes = { FACD9C5C1B2A554100AC1614 = { @@ -295,16 +295,17 @@ FACD9C671B2A554100AC1614 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeamName = "Raphael Cruzeiro (Personal Team)"; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; }; }; }; buildConfigurationList = FACD9C571B2A554100AC1614 /* Build configuration list for PBXProject "RazzleDazzle" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = FACD9C531B2A554100AC1614; productRefGroup = FACD9C5E1B2A554100AC1614 /* Products */; @@ -398,6 +399,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; @@ -446,7 +448,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -457,6 +459,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; @@ -497,7 +500,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -524,7 +527,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -546,7 +549,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -566,7 +569,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -582,7 +585,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "ifttt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme index e5b8f3a..d1e094b 100644 --- a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme +++ b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme @@ -1,6 +1,6 @@ Date: Tue, 9 Apr 2019 19:17:34 +0800 Subject: [PATCH 6/6] fix: fix carthage failed issue --- .../xcshareddata/xcschemes/RazzleDazzle.xcscheme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme index d1e094b..977ecf1 100644 --- a/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme +++ b/Example/RazzleDazzle.xcodeproj/xcshareddata/xcschemes/RazzleDazzle.xcscheme @@ -34,6 +34,20 @@ ReferencedContainer = "container:RazzleDazzle.xcodeproj"> + + + +