From 2b86d0cfce012594cdf8404457e1af6c4eb22632 Mon Sep 17 00:00:00 2001 From: featherless Date: Thu, 4 Mar 2021 19:31:30 +0000 Subject: [PATCH 1/6] Fix a bug on iOS 14 causing flickers in MDC's ActivityIndicator (#127) Context: https://github.com/material-components/material-components-ios/issues/10109 --- src/MDMMotionAnimator.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/MDMMotionAnimator.m b/src/MDMMotionAnimator.m index 03d1dbb..90ee3ce 100644 --- a/src/MDMMotionAnimator.m +++ b/src/MDMMotionAnimator.m @@ -342,8 +342,21 @@ - (void)addAnimation:(CABasicAnimation *)animation animation.beginTime = ([layer convertTime:CACurrentMediaTime() fromLayer:nil] + traits.delay * timeScaleFactor); animation.fillMode = kCAFillModeBackwards; + } else if (@available(iOS 14, *)) { + // iOS 14 introduced a behavioral change for animations such that they no longer appear to + // immediately be committed to the render server, potentially resulting in a brief flicker to + // the model layer's value before the animation takes effect. This could reasonably be + // considered a bug in iOS. + // To work around this, we can explicitly enforce the contract that this animation is expected + // to start "now" in terms of render server timing. This does mean we may lose some microseconds + // of animation timing at the beginning of the animation, so we only apply this on iOS 14+ where + // it's needed. If and when iOS fixes this bug we can remove the following line and lean on the + // render server choosing the appropriate start time once the animation is flushed to the render + // server. + animation.beginTime = [layer convertTime:CACurrentMediaTime() fromLayer:nil]; } + [_registrar addAnimation:animation toLayer:layer forKey:key completion:completion]; } From dfab38b3d53aa8d10750b321d355418ee34714eb Mon Sep 17 00:00:00 2001 From: featherless Date: Mon, 5 Apr 2021 11:53:10 -0400 Subject: [PATCH 2/6] Remove bazel support. (#129) --- BUILD | 83 ------------------------------------------------------- WORKSPACE | 60 ---------------------------------------- 2 files changed, 143 deletions(-) delete mode 100644 BUILD delete mode 100644 WORKSPACE diff --git a/BUILD b/BUILD deleted file mode 100644 index e344490..0000000 --- a/BUILD +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 2017-present The Material Motion Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Description: -# A Motion Animator creates performant, interruptible animations from motion specs. - -load("@build_bazel_rules_apple//apple:ios.bzl", "ios_ui_test") -load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") -load("@bazel_ios_warnings//:strict_warnings_objc_library.bzl", "strict_warnings_objc_library") - -licenses(["notice"]) # Apache 2.0 - -exports_files(["LICENSE"]) - -strict_warnings_objc_library( - name = "MotionAnimator", - srcs = glob([ - "src/*.m", - "src/private/*.m", - ]), - hdrs = glob([ - "src/*.h", - "src/private/*.h", - ]), - sdk_frameworks = [ - "CoreGraphics", - "Foundation", - "QuartzCore", - ], - defines = ["IS_BAZEL_BUILD"], - deps = [ - "@motion_interchange_objc//:MotionInterchange" - ], - enable_modules = 1, - includes = ["src"], - visibility = ["//visibility:public"], -) - -swift_library( - name = "UnitTestsSwiftLib", - srcs = glob([ - "tests/unit/*.swift", - ]), - defines = ["IS_BAZEL_BUILD"], - deps = [":MotionAnimator"], - visibility = ["//visibility:private"], -) - -objc_library( - name = "UnitTestsLib", - srcs = glob([ - "tests/unit/*.m", - ]), - hdrs = glob([ - "tests/unit/*.h", - ]), - enable_modules = 1, - deps = [":MotionAnimator"], - visibility = ["//visibility:private"], -) - -ios_ui_test( - name = "UnitTests", - deps = [ - ":UnitTestsLib", - ":UnitTestsSwiftLib" - ], - test_host = "@build_bazel_rules_apple//apple/testing/default_host/ios", - minimum_os_version = "9.0", - timeout = "short", - visibility = ["//visibility:private"], -) diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index d88738f..0000000 --- a/WORKSPACE +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2017-present The Material Motion Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") - -git_repository( - name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - tag = "0.9.0", -) - -load( - "@build_bazel_rules_apple//apple:repositories.bzl", - "apple_rules_dependencies", -) - -apple_rules_dependencies() - -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - tag = "0.4.0", -) - -load( - "@build_bazel_rules_swift//swift:repositories.bzl", - "swift_rules_dependencies", -) - -swift_rules_dependencies() - -git_repository( - name = "bazel_ios_warnings", - remote = "https://github.com/material-foundation/bazel_ios_warnings.git", - tag = "v2.0.0", -) - -git_repository( - name = "motion_interchange_objc", - remote = "https://github.com/material-motion/motion-interchange-objc.git", - commit = "v3.0.0", -) - -http_file( - name = "xctestrunner", - executable = 1, - urls = ["https://github.com/google/xctestrunner/releases/download/0.2.5/ios_test_runner.par"], -) From 43faadd9b9ae9ee9708b28c6e8f11b87f89cc3da Mon Sep 17 00:00:00 2001 From: featherless Date: Mon, 5 Apr 2021 14:38:29 -0400 Subject: [PATCH 3/6] Upgrade to Swift 5 and min OS of iOS 10. (#130) --- .swift-version | 2 +- .travis.yml | 12 ++- MotionAnimator.podspec | 2 +- Podfile.lock | 2 +- examples/TapToBounceTraitsExample.swift | 4 +- examples/TapToBounceUIKitExample.swift | 4 +- .../apps/Catalog/Catalog/AppDelegate.swift | 2 +- .../project.pbxproj | 39 +++++++-- .../xcschemes/MotionAnimatorCatalog.xcscheme | 24 +++--- .../xcshareddata/xcschemes/UnitTests.xcscheme | 6 +- .../Catalog/TestHarness/AppDelegate.swift | 2 +- tests/unit/BeginFromCurrentStateTests.swift | 36 ++++---- tests/unit/ImplicitAnimationTests.swift | 84 +++++++++---------- tests/unit/InitialVelocityTests.swift | 15 ++-- tests/unit/UIKitBehavioralTests.swift | 22 ++--- 15 files changed, 129 insertions(+), 127 deletions(-) diff --git a/.swift-version b/.swift-version index 9f55b2c..7ed6ff8 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +5 diff --git a/.travis.yml b/.travis.yml index e66b04c..0260f6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,12 @@ env: - LANGUAGE=en_US.UTF-8 matrix: include: - - osx_image: xcode9.2 - env: COVERAGE=code_coverage SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=11.2" - - osx_image: xcode9.2 - env: SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=10.3.1" - - osx_image: xcode9.2 - env: SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=9.3" + - osx_image: xcode12.2 + env: COVERAGE=code_coverage SDK="iphonesimulator14.2" DESTINATION="name=iPhone 6s,OS=11.4" + - osx_image: xcode12.2 + env: SDK="iphonesimulator14.2" DESTINATION="name=iPhone 6s,OS=10.3.1" before_install: - - gem install cocoapods --no-rdoc --no-ri --no-document --quiet + - gem install cocoapods --no-document --quiet - pod install --repo-update script: - set -o pipefail diff --git a/MotionAnimator.podspec b/MotionAnimator.podspec index dc2dcab..79fef60 100644 --- a/MotionAnimator.podspec +++ b/MotionAnimator.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.license = "Apache 2.0" s.homepage = "https://github.com/material-motion/motion-animator-objc" s.source = { :git => "https://github.com/material-motion/motion-animator-objc.git", :tag => "v" + s.version.to_s } - s.platform = :ios, "9.0" + s.platform = :ios, "10.0" s.requires_arc = true s.public_header_files = "src/*.h" diff --git a/Podfile.lock b/Podfile.lock index 1c926df..aeb326e 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -19,7 +19,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: CatalogByConvention: 2b58a9b64e5b1049abb5d3f8e764a551bbe843a7 - MotionAnimator: 5f99d7c9592928c0f28a66283eda9c3b657dc480 + MotionAnimator: 0ca495182cae31240fd6fd42de861b312c022987 MotionInterchange: 13adae439b377e31d1674cc165539d50e1d1566a PODFILE CHECKSUM: 3537bf01c11174928ac008c20fec4738722e96f3 diff --git a/examples/TapToBounceTraitsExample.swift b/examples/TapToBounceTraitsExample.swift index cf86814..058d9a7 100644 --- a/examples/TapToBounceTraitsExample.swift +++ b/examples/TapToBounceTraitsExample.swift @@ -51,7 +51,7 @@ class TapToBounceTraitsExampleViewController: UIViewController { tension: 100, friction: 10)) - func didFocus(_ sender: UIButton) { + @objc func didFocus(_ sender: UIButton) { let animator = MotionAnimator() animator.animate(with: traits) { sender.transform = CGAffineTransform(scaleX: 1.5, y: 1.5) @@ -62,7 +62,7 @@ class TapToBounceTraitsExampleViewController: UIViewController { } } - func didUnfocus(_ sender: UIButton) { + @objc func didUnfocus(_ sender: UIButton) { let animator = MotionAnimator() animator.animate(with: traits) { sender.transform = .identity diff --git a/examples/TapToBounceUIKitExample.swift b/examples/TapToBounceUIKitExample.swift index 95ff44b..6056df8 100644 --- a/examples/TapToBounceUIKitExample.swift +++ b/examples/TapToBounceUIKitExample.swift @@ -46,7 +46,7 @@ class TapToBounceUIKitExampleViewController: UIViewController { for: [.touchUpInside, .touchUpOutside, .touchDragExit]) } - func didFocus(_ sender: UIButton) { + @objc func didFocus(_ sender: UIButton) { MotionAnimator.animate(withDuration: 0.8, delay: 0, usingSpringWithDamping: 0.5, @@ -61,7 +61,7 @@ class TapToBounceUIKitExampleViewController: UIViewController { }, completion: nil) } - func didUnfocus(_ sender: UIButton) { + @objc func didUnfocus(_ sender: UIButton) { MotionAnimator.animate(withDuration: 0.8, delay: 0, usingSpringWithDamping: 0.5, diff --git a/examples/apps/Catalog/Catalog/AppDelegate.swift b/examples/apps/Catalog/Catalog/AppDelegate.swift index a16deca..4d9df67 100644 --- a/examples/apps/Catalog/Catalog/AppDelegate.swift +++ b/examples/apps/Catalog/Catalog/AppDelegate.swift @@ -22,7 +22,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 { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window diff --git a/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/project.pbxproj b/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/project.pbxproj index 7600b1b..1d6c141 100644 --- a/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/project.pbxproj +++ b/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/project.pbxproj @@ -335,7 +335,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0810; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1240; ORGANIZATIONNAME = Google; TargetAttributes = { 666FAA7F1D384A6B000363DA = { @@ -358,6 +358,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -567,18 +568,30 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -600,11 +613,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9; + IPHONEOS_DEPLOYMENT_TARGET = 10; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -613,18 +627,30 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -640,9 +666,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9; + IPHONEOS_DEPLOYMENT_TARGET = 10; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -659,7 +686,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -674,7 +700,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; }; name = Release; }; @@ -690,7 +715,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestHarness.app/TestHarness"; }; name = Debug; @@ -707,7 +731,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestHarness.app/TestHarness"; }; name = Release; @@ -724,7 +747,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.TestHarness; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -740,7 +762,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.TestHarness; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/xcshareddata/xcschemes/MotionAnimatorCatalog.xcscheme b/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/xcshareddata/xcschemes/MotionAnimatorCatalog.xcscheme index 8840899..53827c8 100644 --- a/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/xcshareddata/xcschemes/MotionAnimatorCatalog.xcscheme +++ b/examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/xcshareddata/xcschemes/MotionAnimatorCatalog.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -39,17 +48,6 @@ - - - - - - - - - - - - Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window window.rootViewController = UINavigationController(rootViewController: UIViewController()) diff --git a/tests/unit/BeginFromCurrentStateTests.swift b/tests/unit/BeginFromCurrentStateTests.swift index 64fe90b..8e3026b 100644 --- a/tests/unit/BeginFromCurrentStateTests.swift +++ b/tests/unit/BeginFromCurrentStateTests.swift @@ -87,12 +87,11 @@ class BeginFromCurrentStateTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue, initialValue, accuracy: 0.0001, - "Expected the animation to start from \(initialValue), " - + "but it did not.") + XCTAssertEqual(fromValue, initialValue, accuracy: 0.0001, + "Expected the animation to start from \(initialValue), but it did not.") - XCTAssertEqualWithAccuracy(view.layer.opacity, 0.5, accuracy: 0.0001, - "The layer's opacity was not set to the animation's final value.") + XCTAssertEqual(view.layer.opacity, 0.5, accuracy: 0.0001, + "The layer's opacity was not set to the animation's final value.") } func testImplicitlyAnimatesFromModelValue() { @@ -124,12 +123,11 @@ class BeginFromCurrentStateTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue, initialValue, accuracy: 0.0001, - "Expected the animation to start from \(initialValue), " - + "but it did not.") + XCTAssertEqual(fromValue, initialValue, accuracy: 0.0001, + "Expected the animation to start from \(initialValue), but it did not.") - XCTAssertEqualWithAccuracy(view.layer.opacity, 0.5, accuracy: 0.0001, - "The layer's opacity was not set to the animation's final value.") + XCTAssertEqual(view.layer.opacity, 0.5, accuracy: 0.0001, + "The layer's opacity was not set to the animation's final value.") } func testExplicitlyAnimatesFromPresentationValue() { @@ -168,12 +166,11 @@ class BeginFromCurrentStateTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue, initialValue, accuracy: 0.0001, - "Expected the animation to start from \(initialValue), " - + "but it did not.") + XCTAssertEqual(fromValue, initialValue, accuracy: 0.0001, + "Expected the animation to start from \(initialValue), but it did not.") - XCTAssertEqualWithAccuracy(view.layer.opacity, 0.2, accuracy: 0.0001, - "The layer's opacity was not set to the animation's final value.") + XCTAssertEqual(view.layer.opacity, 0.2, accuracy: 0.0001, + "The layer's opacity was not set to the animation's final value.") } func testImplicitlyAnimatesFromPresentationValue() { @@ -214,11 +211,10 @@ class BeginFromCurrentStateTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue, initialValue, accuracy: 0.0001, - "Expected the animation to start from \(initialValue), " - + "but it did not.") + XCTAssertEqual(fromValue, initialValue, accuracy: 0.0001, + "Expected the animation to start from \(initialValue), but it did not.") - XCTAssertEqualWithAccuracy(view.layer.opacity, 0.2, accuracy: 0.0001, + XCTAssertEqual(view.layer.opacity, 0.2, accuracy: 0.0001, "The layer's opacity was not set to the animation's final value.") } @@ -245,7 +241,7 @@ class BeginFromCurrentStateTests: XCTestCase { XCTAssertFalse(animation.isAdditive) XCTAssertEqual(animation.keyPath, AnimatableKeyPath.opacity.rawValue) XCTAssertEqual(animation.fromValue as! Float, initialValue) - XCTAssertEqualWithAccuracy(animation.toValue as! CGFloat, 1.0, accuracy: 0.0001) + XCTAssertEqual(animation.toValue as! CGFloat, 1.0, accuracy: 0.0001) } } } diff --git a/tests/unit/ImplicitAnimationTests.swift b/tests/unit/ImplicitAnimationTests.swift index 9ecf8d0..d102dc0 100644 --- a/tests/unit/ImplicitAnimationTests.swift +++ b/tests/unit/ImplicitAnimationTests.swift @@ -88,14 +88,14 @@ class ImplicitAnimationTests: XCTestCase { XCTAssertEqual(animation.duration, traits.duration) let timingCurve = traits.timingCurve as! CAMediaTimingFunction - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, - accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, + accuracy: 0.001) } func testTwoActionsAddsTwoAnimations() { @@ -118,14 +118,14 @@ class ImplicitAnimationTests: XCTestCase { XCTAssertEqual(animation.duration, traits.duration) let timingCurve = traits.timingCurve as! CAMediaTimingFunction - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, - accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, + accuracy: 0.001) } do { let animation = addedAnimations[1] as! CABasicAnimation @@ -136,14 +136,14 @@ class ImplicitAnimationTests: XCTestCase { XCTAssertEqual(animation.duration, traits.duration) let timingCurve = traits.timingCurve as! CAMediaTimingFunction - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, - accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, + accuracy: 0.001) } } @@ -159,7 +159,7 @@ class ImplicitAnimationTests: XCTestCase { do { let animation = addedAnimations - .flatMap { $0 as? CABasicAnimation } + .compactMap { $0 as? CABasicAnimation } .first(where: { $0.keyPath == AnimatableKeyPath.position.rawValue})! XCTAssertFalse(animation.isAdditive) XCTAssertEqual(animation.fromValue as! CGPoint, .init(x: 0, y: 0)) @@ -167,18 +167,18 @@ class ImplicitAnimationTests: XCTestCase { XCTAssertEqual(animation.duration, traits.duration) let timingCurve = traits.timingCurve as! CAMediaTimingFunction - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, - accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, + accuracy: 0.001) } do { let animation = addedAnimations - .flatMap { $0 as? CABasicAnimation } + .compactMap { $0 as? CABasicAnimation } .first(where: { $0.keyPath == AnimatableKeyPath.bounds.rawValue})! XCTAssertFalse(animation.isAdditive) XCTAssertEqual(animation.fromValue as! CGRect, .init(x: 0, y: 0, width: 0, height: 0)) @@ -186,14 +186,14 @@ class ImplicitAnimationTests: XCTestCase { XCTAssertEqual(animation.duration, traits.duration) let timingCurve = traits.timingCurve as! CAMediaTimingFunction - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, - accuracy: 0.001) - XCTAssertEqualWithAccuracy(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, - accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.x, animation.timingFunction!.mdm_point1.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point1.y, animation.timingFunction!.mdm_point1.y, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.x, animation.timingFunction!.mdm_point2.x, + accuracy: 0.001) + XCTAssertEqual(timingCurve.mdm_point2.y, animation.timingFunction!.mdm_point2.y, + accuracy: 0.001) } } diff --git a/tests/unit/InitialVelocityTests.swift b/tests/unit/InitialVelocityTests.swift index fa4b5fe..a8143e8 100644 --- a/tests/unit/InitialVelocityTests.swift +++ b/tests/unit/InitialVelocityTests.swift @@ -48,7 +48,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 0, to: 100, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.initialVelocity))) { XCTAssertEqual(animation.initialVelocity, 0.5, "from: \(animation.fromValue!), " @@ -63,7 +63,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 100, to: 0, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.initialVelocity))) { XCTAssertEqual(animation.initialVelocity, 0.5, "from: \(animation.fromValue!), " @@ -78,7 +78,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 0, to: 100, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.initialVelocity))) { XCTAssertGreaterThan(animation.initialVelocity, 0, "from: \(animation.fromValue!), " @@ -93,7 +93,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 0, to: 100, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.initialVelocity))) { XCTAssertLessThan(animation.initialVelocity, 0, "from: \(animation.fromValue!), " @@ -108,7 +108,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 100, to: 0, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.initialVelocity))) { XCTAssertGreaterThan(animation.initialVelocity, 0, "from: \(animation.fromValue!), " @@ -123,7 +123,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 100, to: 0, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.settlingDuration))) { XCTAssertLessThan(animation.initialVelocity, 0, "from: \(animation.fromValue!), " @@ -138,7 +138,7 @@ class InitialVelocityTests: XCTestCase { animate(from: 0, to: 100, withVelocity: velocity) XCTAssertEqual(addedAnimations.count, 3) - addedAnimations.flatMap { $0 as? CASpringAnimation }.forEach { animation in + addedAnimations.compactMap { $0 as? CASpringAnimation }.forEach { animation in if (animation.responds(to: #selector(getter: CASpringAnimation.settlingDuration))) { XCTAssertEqual(animation.duration, animation.settlingDuration, "from: \(animation.fromValue!), " @@ -162,4 +162,3 @@ class InitialVelocityTests: XCTestCase { layer: CALayer(), keyPath: .init(rawValue: "bounds.size")) } } - diff --git a/tests/unit/UIKitBehavioralTests.swift b/tests/unit/UIKitBehavioralTests.swift index b17179a..86fb81a 100644 --- a/tests/unit/UIKitBehavioralTests.swift +++ b/tests/unit/UIKitBehavioralTests.swift @@ -264,9 +264,8 @@ class UIKitBehavioralTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue, initialValue, accuracy: 0.0001, - "Expected the animation to start from \(initialValue), " - + "but it did not.") + XCTAssertEqual(fromValue, initialValue, accuracy: 0.0001, + "Expected the animation to start from \(initialValue), but it did not.") } func testBeginFromCurrentStateAnimatesOpacityNonAdditivelyFromItsPresentationLayerState() { @@ -278,7 +277,7 @@ class UIKitBehavioralTests: XCTestCase { let initialValue = self.view.layer.presentation()!.opacity - UIView.animate(withDuration: 0.1, delay: 0, options: .beginFromCurrentState, animations: { + UIView.animate(withDuration: 0.1, delay: 0, options: .beginFromCurrentState, animations: { self.view.alpha = 0.2 }, completion: nil) @@ -304,9 +303,8 @@ class UIKitBehavioralTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue, initialValue, accuracy: 0.0001, - "Expected the animation to start from \(initialValue), " - + "but it did not.") + XCTAssertEqual(fromValue, initialValue, accuracy: 0.0001, + "Expected the animation to start from \(initialValue), but it did not.") } func testDefaultsAnimatesPositionAdditivelyFromItsModelLayerState() { @@ -346,9 +344,8 @@ class UIKitBehavioralTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue.x, displacement, accuracy: 0.0001, - "Expected the animation to have a delta of \(displacement), " - + "but it did not.") + XCTAssertEqual(fromValue.x, displacement, accuracy: 0.0001, + "Expected the animation to have a delta of \(displacement), but it did not.") } func testBeginFromCurrentStateAnimatesPositionAdditivelyFromItsModelLayerState() { @@ -388,9 +385,8 @@ class UIKitBehavioralTests: XCTestCase { return } - XCTAssertEqualWithAccuracy(fromValue.x, displacement, accuracy: 0.0001, - "Expected the animation to have a delta of \(displacement), " - + "but it did not.") + XCTAssertEqual(fromValue.x, displacement, accuracy: 0.0001, + "Expected the animation to have a delta of \(displacement), but it did not.") } } From d1e9e75d7558c2ff0a9a485fcc80441c9baa0b8a Mon Sep 17 00:00:00 2001 From: featherless Date: Mon, 5 Apr 2021 22:11:19 -0400 Subject: [PATCH 4/6] Upgrade Pod dependencies and Swift version to 5.0 (#131) Also fixed some iOS 13 and 14 behavioral changes. --- .gitignore | 1 + MotionAnimator.podspec | 2 +- Podfile | 3 ++- Podfile.lock | 16 +++++++------- .../unit/MotionAnimatorBehavioralTests.swift | 4 +++- tests/unit/QuartzCoreBehavioralTests.swift | 4 +++- tests/unit/UIKitBehavioralTests.swift | 22 ++++++++++++++----- tests/unit/UIKitEquivalencyTests.swift | 4 +++- 8 files changed, 37 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 3f65e1c..4e24164 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store bazel-* .kokoro-ios-runner diff --git a/MotionAnimator.podspec b/MotionAnimator.podspec index 79fef60..c971f4c 100644 --- a/MotionAnimator.podspec +++ b/MotionAnimator.podspec @@ -12,5 +12,5 @@ Pod::Spec.new do |s| s.public_header_files = "src/*.h" s.source_files = "src/*.{h,m,mm}", "src/private/*.{h,m,mm}" - s.dependency "MotionInterchange", "~> 3.0" + s.dependency "MotionInterchange", "~> 4.0" end diff --git a/Podfile b/Podfile index 7936bb7..fb663db 100644 --- a/Podfile +++ b/Podfile @@ -1,5 +1,6 @@ workspace 'MotionAnimator.xcworkspace' use_frameworks! +platform :ios, '10.0' target "MotionAnimatorCatalog" do pod 'CatalogByConvention' @@ -15,7 +16,7 @@ end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |configuration| - configuration.build_settings['SWIFT_VERSION'] = "3.0" + configuration.build_settings['SWIFT_VERSION'] = "5.0" if target.name.start_with?("Motion") configuration.build_settings['WARNING_CFLAGS'] ="$(inherited) -Wall -Wcast-align -Wconversion -Werror -Wextra -Wimplicit-atomic-properties -Wmissing-prototypes -Wno-sign-conversion -Wno-unused-parameter -Woverlength-strings -Wshadow -Wstrict-selector-match -Wundeclared-selector -Wunreachable-code -Wno-error=deprecated -Wno-error=deprecated-implementations" end diff --git a/Podfile.lock b/Podfile.lock index aeb326e..b995bf5 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,8 +1,8 @@ PODS: - - CatalogByConvention (2.5.1) + - CatalogByConvention (2.5.2) - MotionAnimator (4.0.1): - - MotionInterchange (~> 3.0) - - MotionInterchange (3.0.0) + - MotionInterchange (~> 4.0) + - MotionInterchange (4.0.1) DEPENDENCIES: - CatalogByConvention @@ -18,10 +18,10 @@ EXTERNAL SOURCES: :path: "./" SPEC CHECKSUMS: - CatalogByConvention: 2b58a9b64e5b1049abb5d3f8e764a551bbe843a7 - MotionAnimator: 0ca495182cae31240fd6fd42de861b312c022987 - MotionInterchange: 13adae439b377e31d1674cc165539d50e1d1566a + CatalogByConvention: ef713654160053be026fa4648dd28caf6b5ca4e1 + MotionAnimator: 3bba97637c12c798c7ea5e28508a912641498dc5 + MotionInterchange: d58704efd5dcd62c6535bc1081df832533a8e9b9 -PODFILE CHECKSUM: 3537bf01c11174928ac008c20fec4738722e96f3 +PODFILE CHECKSUM: ea67d7318ea5fbb64e106792b6249914962adb16 -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.1 diff --git a/tests/unit/MotionAnimatorBehavioralTests.swift b/tests/unit/MotionAnimatorBehavioralTests.swift index 987826a..a4ca560 100644 --- a/tests/unit/MotionAnimatorBehavioralTests.swift +++ b/tests/unit/MotionAnimatorBehavioralTests.swift @@ -59,7 +59,9 @@ class AnimatorBehavioralTests: XCTestCase { .shadowRadius: 5, .strokeStart: 0.2, .strokeEnd: 0.5, - .transform: CGAffineTransform(scaleX: 1.5, y: 1.5), + // Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts + // CATransform3D instances when using KVO. + .transform: CATransform3DMakeScale(1.5, 1.5, 1.5), .width: 25, .x: 12, .y: 23, diff --git a/tests/unit/QuartzCoreBehavioralTests.swift b/tests/unit/QuartzCoreBehavioralTests.swift index a640c73..efc173f 100644 --- a/tests/unit/QuartzCoreBehavioralTests.swift +++ b/tests/unit/QuartzCoreBehavioralTests.swift @@ -84,7 +84,9 @@ class QuartzCoreBehavioralTests: XCTestCase { .shadowRadius: 5, .strokeStart: 0.2, .strokeEnd: 0.5, - .transform: CGAffineTransform(scaleX: 1.5, y: 1.5), + // Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts + // CATransform3D instances when using KVO. + .transform: CATransform3DMakeScale(1.5, 1.5, 1.5), .width: 25, .x: 12, .y: 23, diff --git a/tests/unit/UIKitBehavioralTests.swift b/tests/unit/UIKitBehavioralTests.swift index 86fb81a..d8209d0 100644 --- a/tests/unit/UIKitBehavioralTests.swift +++ b/tests/unit/UIKitBehavioralTests.swift @@ -74,7 +74,9 @@ class UIKitBehavioralTests: XCTestCase { .position: CGPoint(x: 50, y: 20), .rotation: 42, .scale: 2.5, - .transform: CGAffineTransform(scaleX: 1.5, y: 1.5), + // Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts + // CATransform3D instances when using KVO. + .transform: CATransform3DMakeScale(1.5, 1.5, 1.5), .width: 25, .x: 12, .y: 23, @@ -158,12 +160,20 @@ class UIKitBehavioralTests: XCTestCase { ] let properties: [AnimatableKeyPath: Any] - if #available(iOS 11.0, *) { + if #available(iOS 13, *) { + // Shadow opacity became implicitly animatable in iOS 13. + var baselineWithModernSupport = baselineProperties + baselineWithModernSupport.removeValue(forKey: .shadowOpacity) + baselineWithModernSupport.removeValue(forKey: .anchorPoint) + baselineWithModernSupport.removeValue(forKey: .cornerRadius) + properties = baselineWithModernSupport + + } else if #available(iOS 11.0, *) { // Corner radius became implicitly animatable in iOS 11. - var baselineWithOutCornerRadius = baselineProperties - baselineWithOutCornerRadius.removeValue(forKey: .anchorPoint) - baselineWithOutCornerRadius.removeValue(forKey: .cornerRadius) - properties = baselineWithOutCornerRadius + var baselineWithModernSupport = baselineProperties + baselineWithModernSupport.removeValue(forKey: .anchorPoint) + baselineWithModernSupport.removeValue(forKey: .cornerRadius) + properties = baselineWithModernSupport } else { properties = baselineProperties diff --git a/tests/unit/UIKitEquivalencyTests.swift b/tests/unit/UIKitEquivalencyTests.swift index c330796..0af1e06 100644 --- a/tests/unit/UIKitEquivalencyTests.swift +++ b/tests/unit/UIKitEquivalencyTests.swift @@ -67,7 +67,9 @@ class UIKitEquivalencyTests: XCTestCase { .shadowRadius: 5, .strokeStart: 0.2, .strokeEnd: 0.5, - .transform: CGAffineTransform(scaleX: 1.5, y: 1.5), + // Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts + // CATransform3D instances when using KVO. + .transform: CATransform3DMakeScale(1.5, 1.5, 1.5), .x: 12, .y: 23, .z: 3, From c477c347a76170a58a97594af2ece099c1525d16 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 5 Apr 2021 22:21:33 -0400 Subject: [PATCH 5/6] Update changelog. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7065ff3..c64793e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 5.0.0 + +This major release drops Bazel support and support for iOS 9. + # 4.0.1 This patch release fixes a bug on iOS 14 affecting flickers when using animations that have no delay. From 0463c45718c501ce5520a3529c71dbc16db4a993 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 5 Apr 2021 22:21:56 -0400 Subject: [PATCH 6/6] Bump the release. --- .jazzy.yaml | 2 +- MotionAnimator.podspec | 2 +- Podfile.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index 4060008..5c67971 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -1,5 +1,5 @@ module: MotionAnimator -module_version: 4.0.1 +module_version: 5.0.0 sdk: iphonesimulator umbrella_header: src/MotionAnimator.h objc: true diff --git a/MotionAnimator.podspec b/MotionAnimator.podspec index c971f4c..4bd5cf2 100644 --- a/MotionAnimator.podspec +++ b/MotionAnimator.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MotionAnimator" s.summary = "A Motion Animator creates performant, interruptible animations from motion specs." - s.version = "4.0.1" + s.version = "5.0.0" s.authors = "The Material Motion Authors" s.license = "Apache 2.0" s.homepage = "https://github.com/material-motion/motion-animator-objc" diff --git a/Podfile.lock b/Podfile.lock index b995bf5..38d4ea3 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - CatalogByConvention (2.5.2) - - MotionAnimator (4.0.1): + - MotionAnimator (5.0.0): - MotionInterchange (~> 4.0) - MotionInterchange (4.0.1) @@ -19,7 +19,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: CatalogByConvention: ef713654160053be026fa4648dd28caf6b5ca4e1 - MotionAnimator: 3bba97637c12c798c7ea5e28508a912641498dc5 + MotionAnimator: af4b2f0c5e55c58e2f55208c1cafed410c75afb6 MotionInterchange: d58704efd5dcd62c6535bc1081df832533a8e9b9 PODFILE CHECKSUM: ea67d7318ea5fbb64e106792b6249914962adb16