Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit d1e9e75

Browse files
author
featherless
authored
Upgrade Pod dependencies and Swift version to 5.0 (#131)
Also fixed some iOS 13 and 14 behavioral changes.
1 parent 43faadd commit d1e9e75

File tree

8 files changed

+37
-19
lines changed

8 files changed

+37
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
bazel-*
23
.kokoro-ios-runner
34

MotionAnimator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ Pod::Spec.new do |s|
1212
s.public_header_files = "src/*.h"
1313
s.source_files = "src/*.{h,m,mm}", "src/private/*.{h,m,mm}"
1414

15-
s.dependency "MotionInterchange", "~> 3.0"
15+
s.dependency "MotionInterchange", "~> 4.0"
1616
end

Podfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
workspace 'MotionAnimator.xcworkspace'
22
use_frameworks!
3+
platform :ios, '10.0'
34

45
target "MotionAnimatorCatalog" do
56
pod 'CatalogByConvention'
@@ -15,7 +16,7 @@ end
1516
post_install do |installer|
1617
installer.pods_project.targets.each do |target|
1718
target.build_configurations.each do |configuration|
18-
configuration.build_settings['SWIFT_VERSION'] = "3.0"
19+
configuration.build_settings['SWIFT_VERSION'] = "5.0"
1920
if target.name.start_with?("Motion")
2021
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"
2122
end

Podfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
PODS:
2-
- CatalogByConvention (2.5.1)
2+
- CatalogByConvention (2.5.2)
33
- MotionAnimator (4.0.1):
4-
- MotionInterchange (~> 3.0)
5-
- MotionInterchange (3.0.0)
4+
- MotionInterchange (~> 4.0)
5+
- MotionInterchange (4.0.1)
66

77
DEPENDENCIES:
88
- CatalogByConvention
@@ -18,10 +18,10 @@ EXTERNAL SOURCES:
1818
:path: "./"
1919

2020
SPEC CHECKSUMS:
21-
CatalogByConvention: 2b58a9b64e5b1049abb5d3f8e764a551bbe843a7
22-
MotionAnimator: 0ca495182cae31240fd6fd42de861b312c022987
23-
MotionInterchange: 13adae439b377e31d1674cc165539d50e1d1566a
21+
CatalogByConvention: ef713654160053be026fa4648dd28caf6b5ca4e1
22+
MotionAnimator: 3bba97637c12c798c7ea5e28508a912641498dc5
23+
MotionInterchange: d58704efd5dcd62c6535bc1081df832533a8e9b9
2424

25-
PODFILE CHECKSUM: 3537bf01c11174928ac008c20fec4738722e96f3
25+
PODFILE CHECKSUM: ea67d7318ea5fbb64e106792b6249914962adb16
2626

27-
COCOAPODS: 1.9.3
27+
COCOAPODS: 1.10.1

tests/unit/MotionAnimatorBehavioralTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ class AnimatorBehavioralTests: XCTestCase {
5959
.shadowRadius: 5,
6060
.strokeStart: 0.2,
6161
.strokeEnd: 0.5,
62-
.transform: CGAffineTransform(scaleX: 1.5, y: 1.5),
62+
// Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts
63+
// CATransform3D instances when using KVO.
64+
.transform: CATransform3DMakeScale(1.5, 1.5, 1.5),
6365
.width: 25,
6466
.x: 12,
6567
.y: 23,

tests/unit/QuartzCoreBehavioralTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ class QuartzCoreBehavioralTests: XCTestCase {
8484
.shadowRadius: 5,
8585
.strokeStart: 0.2,
8686
.strokeEnd: 0.5,
87-
.transform: CGAffineTransform(scaleX: 1.5, y: 1.5),
87+
// Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts
88+
// CATransform3D instances when using KVO.
89+
.transform: CATransform3DMakeScale(1.5, 1.5, 1.5),
8890
.width: 25,
8991
.x: 12,
9092
.y: 23,

tests/unit/UIKitBehavioralTests.swift

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ class UIKitBehavioralTests: XCTestCase {
7474
.position: CGPoint(x: 50, y: 20),
7575
.rotation: 42,
7676
.scale: 2.5,
77-
.transform: CGAffineTransform(scaleX: 1.5, y: 1.5),
77+
// Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts
78+
// CATransform3D instances when using KVO.
79+
.transform: CATransform3DMakeScale(1.5, 1.5, 1.5),
7880
.width: 25,
7981
.x: 12,
8082
.y: 23,
@@ -158,12 +160,20 @@ class UIKitBehavioralTests: XCTestCase {
158160
]
159161

160162
let properties: [AnimatableKeyPath: Any]
161-
if #available(iOS 11.0, *) {
163+
if #available(iOS 13, *) {
164+
// Shadow opacity became implicitly animatable in iOS 13.
165+
var baselineWithModernSupport = baselineProperties
166+
baselineWithModernSupport.removeValue(forKey: .shadowOpacity)
167+
baselineWithModernSupport.removeValue(forKey: .anchorPoint)
168+
baselineWithModernSupport.removeValue(forKey: .cornerRadius)
169+
properties = baselineWithModernSupport
170+
171+
} else if #available(iOS 11.0, *) {
162172
// Corner radius became implicitly animatable in iOS 11.
163-
var baselineWithOutCornerRadius = baselineProperties
164-
baselineWithOutCornerRadius.removeValue(forKey: .anchorPoint)
165-
baselineWithOutCornerRadius.removeValue(forKey: .cornerRadius)
166-
properties = baselineWithOutCornerRadius
173+
var baselineWithModernSupport = baselineProperties
174+
baselineWithModernSupport.removeValue(forKey: .anchorPoint)
175+
baselineWithModernSupport.removeValue(forKey: .cornerRadius)
176+
properties = baselineWithModernSupport
167177

168178
} else {
169179
properties = baselineProperties

tests/unit/UIKitEquivalencyTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ class UIKitEquivalencyTests: XCTestCase {
6767
.shadowRadius: 5,
6868
.strokeStart: 0.2,
6969
.strokeEnd: 0.5,
70-
.transform: CGAffineTransform(scaleX: 1.5, y: 1.5),
70+
// Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts
71+
// CATransform3D instances when using KVO.
72+
.transform: CATransform3DMakeScale(1.5, 1.5, 1.5),
7173
.x: 12,
7274
.y: 23,
7375
.z: 3,

0 commit comments

Comments
 (0)