lottie-ios 4.0.1 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +25 -0
- package/Lottie.xcodeproj/project.pbxproj +4 -0
- package/Lottie.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +22 -19
- package/Lottie.xcodeproj/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist +3 -3
- package/Lottie.xcworkspace/xcshareddata/swiftpm/Package.resolved +2 -2
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +58 -3
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Expressions.xcexplist +104 -33
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist +7 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/project.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/project.xcworkspace/xcuserdata/valentinperignon.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/xcuserdata/valentinperignon.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
- package/LottieAnimation/LottieAnimation.xcodeproj/xcuserdata/valentinperignon.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/Package.resolved +25 -0
- package/Package.swift +5 -0
- package/README.md +14 -3
- package/Rakefile +29 -43
- package/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +10 -8
- package/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +2 -1
- package/Sources/Private/CoreAnimation/Animations/LayerProperty.swift +26 -3
- package/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +2 -1
- package/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +14 -1
- package/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +81 -6
- package/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +14 -2
- package/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift +43 -9
- package/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift +35 -12
- package/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift +142 -32
- package/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +4 -4
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift +1 -1
- package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift +1 -1
- package/Sources/Private/Model/DotLottie/DotLottieAnimation.swift +4 -7
- package/Sources/Private/Model/DotLottie/Zip/Data+Compression.swift +2 -2
- package/Sources/Private/Model/ShapeItems/GradientStroke.swift +53 -0
- package/Sources/Private/Model/ShapeItems/ShapeTransform.swift +9 -0
- package/Sources/Private/Model/ShapeItems/Stroke.swift +35 -0
- package/Sources/Private/Model/ShapeItems/Trim.swift +8 -0
- package/Sources/Private/Utility/Extensions/CGColor+RGB.swift +5 -7
- package/Sources/Public/Animation/LottieAnimationHelpers.swift +2 -2
- package/Sources/Public/Animation/LottieAnimationView.swift +13 -1
- package/Sources/Public/LottieConfiguration.swift +8 -1
- package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +123 -7
- package/lottie-ios.podspec +1 -3
- package/package.json +1 -1
|
@@ -52,6 +52,31 @@ jobs:
|
|
|
52
52
|
name: TestArtifacts
|
|
53
53
|
path: Tests/Artifacts
|
|
54
54
|
|
|
55
|
+
build-xcframework:
|
|
56
|
+
name: "Build XCFramework"
|
|
57
|
+
runs-on: macos-12
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v2
|
|
60
|
+
- uses: ./.github/actions/setup
|
|
61
|
+
with:
|
|
62
|
+
# XCFrameworks are forwards-compatible but not backwards-compatible.
|
|
63
|
+
# The Xcode version we use for this job is that oldest Xcode version that
|
|
64
|
+
# will be able to use these XCFrameworks and the lottie-spm package.
|
|
65
|
+
xcode: '13.2.1' # Swift 5.5.2
|
|
66
|
+
- name: Build XCFramework
|
|
67
|
+
run: bundle exec rake build:xcframework
|
|
68
|
+
- name: Upload XCFramework
|
|
69
|
+
uses: actions/upload-artifact@v2
|
|
70
|
+
with:
|
|
71
|
+
name: BuildProducts
|
|
72
|
+
# The xcframework is at the path `.build/archives/Lottie.xcframework.zip`.
|
|
73
|
+
# GitHub always zips the artifacts before uploading, so if we uploaded the .xframework.zip
|
|
74
|
+
# directly then it would actually upload a double-zip (a .zip containing our `Lottie.xcframework.zip`).
|
|
75
|
+
# This is confusing especially since macOS Archive Utility automatially unzips both layers at once.
|
|
76
|
+
# Instead, we upload the entire archives folder, resulting in an `XCFramework.zip` that unzips
|
|
77
|
+
# to an `archives` directory containing our `Lottie.xcframework.zip`.
|
|
78
|
+
path: .build/archives
|
|
79
|
+
|
|
55
80
|
cocoapod:
|
|
56
81
|
name: "Lint CocoaPods podspec"
|
|
57
82
|
runs-on: macos-12
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
2E450DAC283415D500E56D19 /* OpacityAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E450DAB283415D500E56D19 /* OpacityAnimation.swift */; };
|
|
43
43
|
2E450DAD283415D500E56D19 /* OpacityAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E450DAB283415D500E56D19 /* OpacityAnimation.swift */; };
|
|
44
44
|
2E450DAE283415D500E56D19 /* OpacityAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E450DAB283415D500E56D19 /* OpacityAnimation.swift */; };
|
|
45
|
+
2E70F79F295BB6D30089A0EF /* CompatibleAnimationViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E70F79E295BB6D30089A0EF /* CompatibleAnimationViewTests.swift */; };
|
|
45
46
|
2E72128327BB329C0027BC56 /* AnimationKeypathTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E72128227BB329C0027BC56 /* AnimationKeypathTests.swift */; };
|
|
46
47
|
2E72128527BB32DB0027BC56 /* PerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E72128427BB32DB0027BC56 /* PerformanceTests.swift */; };
|
|
47
48
|
2E8040B027A072B8006E74CB /* Lottie.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E80409A27A0725D006E74CB /* Lottie.framework */; };
|
|
@@ -674,6 +675,7 @@
|
|
|
674
675
|
2E044E262820536800FA773B /* AutomaticEngineTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomaticEngineTests.swift; sourceTree = "<group>"; };
|
|
675
676
|
2E09FA0527B6CEB600BA84E5 /* HardcodedFontProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HardcodedFontProvider.swift; sourceTree = "<group>"; };
|
|
676
677
|
2E450DAB283415D500E56D19 /* OpacityAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpacityAnimation.swift; sourceTree = "<group>"; };
|
|
678
|
+
2E70F79E295BB6D30089A0EF /* CompatibleAnimationViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompatibleAnimationViewTests.swift; sourceTree = "<group>"; };
|
|
677
679
|
2E72128227BB329C0027BC56 /* AnimationKeypathTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationKeypathTests.swift; sourceTree = "<group>"; };
|
|
678
680
|
2E72128427BB32DB0027BC56 /* PerformanceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PerformanceTests.swift; sourceTree = "<group>"; };
|
|
679
681
|
2E80409A27A0725D006E74CB /* Lottie.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Lottie.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
@@ -961,6 +963,7 @@
|
|
|
961
963
|
6DB3BDB528243FA5002A276D /* ValueProvidersTests.swift */,
|
|
962
964
|
D453D8AE28FF9BC600D3F49C /* AnimationCacheProviderTests.swift */,
|
|
963
965
|
08CB2680291ED2B700B4F071 /* AnimationViewTests.swift */,
|
|
966
|
+
2E70F79E295BB6D30089A0EF /* CompatibleAnimationViewTests.swift */,
|
|
964
967
|
);
|
|
965
968
|
path = Tests;
|
|
966
969
|
sourceTree = "<group>";
|
|
@@ -2051,6 +2054,7 @@
|
|
|
2051
2054
|
2E80450D27A07347006E74CB /* SnapshotConfiguration.swift in Sources */,
|
|
2052
2055
|
6DEF696E2824A76C007D640F /* BundleTests.swift in Sources */,
|
|
2053
2056
|
2EAF59A727A076BC00E00531 /* Bundle+Module.swift in Sources */,
|
|
2057
|
+
2E70F79F295BB6D30089A0EF /* CompatibleAnimationViewTests.swift in Sources */,
|
|
2054
2058
|
2E8044AE27A07347006E74CB /* Snapshotting+presentationLayer.swift in Sources */,
|
|
2055
2059
|
36E57EAC28AF7ADF00B7EFDA /* HardcodedTextProvider.swift in Sources */,
|
|
2056
2060
|
2E72128527BB32DB0027BC56 /* PerformanceTests.swift in Sources */,
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"object": {
|
|
3
|
+
"pins": [
|
|
4
|
+
{
|
|
5
|
+
"package": "Difference",
|
|
6
|
+
"repositoryURL": "https://github.com/krzysztofzablocki/Difference",
|
|
7
|
+
"state": {
|
|
8
|
+
"branch": null,
|
|
9
|
+
"revision": "f627d00718033c3d7888acd5f4e3524a843db1cf",
|
|
10
|
+
"version": "1.0.2"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"package": "swift-snapshot-testing",
|
|
15
|
+
"repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git",
|
|
16
|
+
"state": {
|
|
17
|
+
"branch": null,
|
|
18
|
+
"revision": "0c2826f26d00ff5ddf2de92cb6b2139b0dd3d1ee",
|
|
19
|
+
"version": null
|
|
20
|
+
}
|
|
10
21
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"kind" : "remoteSourceControl",
|
|
15
|
-
"location" : "https://github.com/pointfreeco/swift-snapshot-testing.git",
|
|
16
|
-
"state" : {
|
|
17
|
-
"revision" : "0c2826f26d00ff5ddf2de92cb6b2139b0dd3d1ee"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"version" : 2
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"version": 1
|
|
22
25
|
}
|
package/Lottie.xcodeproj/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist
CHANGED
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
<key>Lottie (iOS).xcscheme_^#shared#^_</key>
|
|
8
8
|
<dict>
|
|
9
9
|
<key>orderHint</key>
|
|
10
|
-
<integer>
|
|
10
|
+
<integer>2</integer>
|
|
11
11
|
</dict>
|
|
12
12
|
<key>Lottie (macOS).xcscheme_^#shared#^_</key>
|
|
13
13
|
<dict>
|
|
14
14
|
<key>orderHint</key>
|
|
15
|
-
<integer>
|
|
15
|
+
<integer>4</integer>
|
|
16
16
|
</dict>
|
|
17
17
|
<key>Lottie (tvOS).xcscheme_^#shared#^_</key>
|
|
18
18
|
<dict>
|
|
19
19
|
<key>orderHint</key>
|
|
20
|
-
<integer>
|
|
20
|
+
<integer>5</integer>
|
|
21
21
|
</dict>
|
|
22
22
|
</dict>
|
|
23
23
|
</dict>
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"repositoryURL": "https://github.com/airbnb/swift",
|
|
25
25
|
"state": {
|
|
26
26
|
"branch": null,
|
|
27
|
-
"revision": "
|
|
28
|
-
"version":
|
|
27
|
+
"revision": "07bb2e0822ca6e464bf3610ed452568931fdbf65",
|
|
28
|
+
"version": "1.0.3"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
{
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate
CHANGED
|
Binary file
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
CHANGED
|
@@ -5,12 +5,67 @@
|
|
|
5
5
|
version = "2.0">
|
|
6
6
|
<Breakpoints>
|
|
7
7
|
<BreakpointProxy
|
|
8
|
-
BreakpointExtensionID = "Xcode.Breakpoint.
|
|
8
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
9
9
|
<BreakpointContent
|
|
10
|
-
uuid = "
|
|
10
|
+
uuid = "9DC6749B-AFBA-42EA-B760-D50A245DEC24"
|
|
11
11
|
shouldBeEnabled = "No"
|
|
12
12
|
ignoreCount = "0"
|
|
13
|
-
continueAfterRunningActions = "No"
|
|
13
|
+
continueAfterRunningActions = "No"
|
|
14
|
+
filePath = "Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift"
|
|
15
|
+
startingColumnNumber = "9223372036854775807"
|
|
16
|
+
endingColumnNumber = "9223372036854775807"
|
|
17
|
+
startingLineNumber = "137"
|
|
18
|
+
endingLineNumber = "137"
|
|
19
|
+
landmarkName = "rebuildOutputs(frame:)"
|
|
20
|
+
landmarkType = "7">
|
|
21
|
+
<Locations>
|
|
22
|
+
<Location
|
|
23
|
+
uuid = "9DC6749B-AFBA-42EA-B760-D50A245DEC24 - f0c945e8360ca5fb"
|
|
24
|
+
shouldBeEnabled = "Yes"
|
|
25
|
+
ignoreCount = "0"
|
|
26
|
+
continueAfterRunningActions = "No"
|
|
27
|
+
symbolName = "Lottie.LayerTransformNode.rebuildOutputs(frame: CoreGraphics.CGFloat) -> ()"
|
|
28
|
+
moduleName = "Lottie"
|
|
29
|
+
usesParentBreakpointCondition = "Yes"
|
|
30
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift"
|
|
31
|
+
startingColumnNumber = "9223372036854775807"
|
|
32
|
+
endingColumnNumber = "9223372036854775807"
|
|
33
|
+
startingLineNumber = "137"
|
|
34
|
+
endingLineNumber = "137"
|
|
35
|
+
offsetFromSymbolStart = "2042">
|
|
36
|
+
</Location>
|
|
37
|
+
<Location
|
|
38
|
+
uuid = "9DC6749B-AFBA-42EA-B760-D50A245DEC24 - f0c945e8360ca5fb"
|
|
39
|
+
shouldBeEnabled = "Yes"
|
|
40
|
+
ignoreCount = "0"
|
|
41
|
+
continueAfterRunningActions = "No"
|
|
42
|
+
symbolName = "Lottie.LayerTransformNode.rebuildOutputs(frame: CoreGraphics.CGFloat) -> ()"
|
|
43
|
+
moduleName = "Lottie"
|
|
44
|
+
usesParentBreakpointCondition = "Yes"
|
|
45
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift"
|
|
46
|
+
startingColumnNumber = "9223372036854775807"
|
|
47
|
+
endingColumnNumber = "9223372036854775807"
|
|
48
|
+
startingLineNumber = "137"
|
|
49
|
+
endingLineNumber = "137"
|
|
50
|
+
offsetFromSymbolStart = "2258">
|
|
51
|
+
</Location>
|
|
52
|
+
</Locations>
|
|
53
|
+
</BreakpointContent>
|
|
54
|
+
</BreakpointProxy>
|
|
55
|
+
<BreakpointProxy
|
|
56
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
57
|
+
<BreakpointContent
|
|
58
|
+
uuid = "69613CF7-1A73-4964-BA21-D493D8A4F285"
|
|
59
|
+
shouldBeEnabled = "No"
|
|
60
|
+
ignoreCount = "0"
|
|
61
|
+
continueAfterRunningActions = "No"
|
|
62
|
+
filePath = "Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift"
|
|
63
|
+
startingColumnNumber = "9223372036854775807"
|
|
64
|
+
endingColumnNumber = "9223372036854775807"
|
|
65
|
+
startingLineNumber = "24"
|
|
66
|
+
endingLineNumber = "24"
|
|
67
|
+
landmarkName = "timed(with:for:)"
|
|
68
|
+
landmarkType = "7">
|
|
14
69
|
</BreakpointContent>
|
|
15
70
|
</BreakpointProxy>
|
|
16
71
|
</Breakpoints>
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Expressions.xcexplist
CHANGED
|
@@ -3,59 +3,88 @@
|
|
|
3
3
|
version = "1.0">
|
|
4
4
|
<ContextStates>
|
|
5
5
|
<ContextState
|
|
6
|
-
contextName = "
|
|
6
|
+
contextName = "CAShapeLayer.addStrokeAnimations(for:context:):StrokeAnimation.swift">
|
|
7
7
|
<PersistentStrings>
|
|
8
8
|
<PersistentString
|
|
9
|
-
value = "
|
|
9
|
+
value = "UIColor(cgColor: strokeColor.keyframes[0].value.cgColorValue)">
|
|
10
10
|
</PersistentString>
|
|
11
|
+
</PersistentStrings>
|
|
12
|
+
</ContextState>
|
|
13
|
+
<ContextState
|
|
14
|
+
contextName = "ShapeItemLayer.setupSolidFillAnimations(shapeLayer:context:):ShapeItemLayer.swift">
|
|
15
|
+
<PersistentStrings>
|
|
11
16
|
<PersistentString
|
|
12
|
-
value = "
|
|
17
|
+
value = "fill.color.keyframes.last!.value.cgColorValue">
|
|
13
18
|
</PersistentString>
|
|
14
19
|
</PersistentStrings>
|
|
15
20
|
</ContextState>
|
|
16
21
|
<ContextState
|
|
17
|
-
contextName = "closure #1 in CAShapeLayer.
|
|
22
|
+
contextName = "closure #1 in CAShapeLayer.addStarAnimation(for:context:pathMultiplier:):StarAnimation.swift">
|
|
18
23
|
<PersistentStrings>
|
|
19
24
|
<PersistentString
|
|
20
|
-
value = "UIBezierPath(cgPath:
|
|
25
|
+
value = "UIBezierPath(cgPath: path)">
|
|
21
26
|
</PersistentString>
|
|
22
27
|
</PersistentStrings>
|
|
23
28
|
</ContextState>
|
|
24
29
|
<ContextState
|
|
25
|
-
contextName = "
|
|
30
|
+
contextName = "GradientRenderLayer.addGradientAnimations(for:type:context:):GradientAnimations.swift">
|
|
31
|
+
</ContextState>
|
|
32
|
+
<ContextState
|
|
33
|
+
contextName = "MaskCompositionLayer.init(masks:):MaskCompositionLayer.swift">
|
|
34
|
+
</ContextState>
|
|
35
|
+
<ContextState
|
|
36
|
+
contextName = "GroupLayer.init(group:inheritedItems:context:):ShapeLayer.swift">
|
|
37
|
+
</ContextState>
|
|
38
|
+
<ContextState
|
|
39
|
+
contextName = "ShapeNode.rebuildOutputs(frame:):ShapeNode.swift">
|
|
26
40
|
<PersistentStrings>
|
|
27
41
|
<PersistentString
|
|
28
|
-
value = "
|
|
42
|
+
value = "properties.path">
|
|
29
43
|
</PersistentString>
|
|
30
44
|
</PersistentStrings>
|
|
31
45
|
</ContextState>
|
|
32
46
|
<ContextState
|
|
33
|
-
contextName = "
|
|
47
|
+
contextName = "FillNode.rebuildOutputs(frame:):FillNode.swift">
|
|
34
48
|
<PersistentStrings>
|
|
35
49
|
<PersistentString
|
|
36
|
-
value = "
|
|
50
|
+
value = "fillProperties.color.value.cgColorValue">
|
|
37
51
|
</PersistentString>
|
|
38
52
|
</PersistentStrings>
|
|
39
53
|
</ContextState>
|
|
40
54
|
<ContextState
|
|
41
|
-
contextName = "
|
|
55
|
+
contextName = "CALayer.addPositionAnimations(from:context:):TransformAnimations.swift">
|
|
42
56
|
</ContextState>
|
|
43
57
|
<ContextState
|
|
44
|
-
contextName = "
|
|
58
|
+
contextName = "CALayer.makeGroupLayers(from:parentGroup:context:):ShapeLayer.swift">
|
|
59
|
+
</ContextState>
|
|
60
|
+
<ContextState
|
|
61
|
+
contextName = "Array<τ_0_0>.shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems:):ShapeLayer.swift">
|
|
62
|
+
</ContextState>
|
|
63
|
+
<ContextState
|
|
64
|
+
contextName = "CALayer.path<τ_0_0>(keyframes:value:):CALayer+addAnimation.swift">
|
|
45
65
|
<PersistentStrings>
|
|
46
66
|
<PersistentString
|
|
47
|
-
value = "UIBezierPath(cgPath:
|
|
67
|
+
value = "UIBezierPath(cgPath: path)">
|
|
48
68
|
</PersistentString>
|
|
49
69
|
</PersistentStrings>
|
|
50
70
|
</ContextState>
|
|
51
71
|
<ContextState
|
|
52
|
-
contextName = "
|
|
72
|
+
contextName = "closure #2 in GradientRenderLayer.addGradientAnimations(for:type:context:):GradientAnimations.swift">
|
|
53
73
|
<PersistentStrings>
|
|
54
74
|
<PersistentString
|
|
55
|
-
value = "
|
|
75
|
+
value = "gradient.colorConfiguration(from: colorComponents, type: type)">
|
|
56
76
|
</PersistentString>
|
|
57
77
|
</PersistentStrings>
|
|
58
78
|
</ContextState>
|
|
79
|
+
<ContextState
|
|
80
|
+
contextName = "closure #5 in CALayer.makeGroupLayers(from:parentGroup:parentGroupPath:context:):ShapeLayer.swift">
|
|
81
|
+
</ContextState>
|
|
82
|
+
<ContextState
|
|
83
|
+
contextName = "Array<τ_0_0>.shapeRenderGroups.getter:ShapeLayer.swift">
|
|
84
|
+
</ContextState>
|
|
85
|
+
<ContextState
|
|
86
|
+
contextName = "closure #1 in CALayer.addRotationAnimation(from:context:):TransformAnimations.swift">
|
|
87
|
+
</ContextState>
|
|
59
88
|
<ContextState
|
|
60
89
|
contextName = "MaskLayer.updateWithFrame(frame:forceUpdates:):MaskContainerLayer.swift">
|
|
61
90
|
<PersistentStrings>
|
|
@@ -65,35 +94,56 @@
|
|
|
65
94
|
</PersistentStrings>
|
|
66
95
|
</ContextState>
|
|
67
96
|
<ContextState
|
|
68
|
-
contextName = "
|
|
97
|
+
contextName = "CALayer.makeGroupLayers(from:parentGroup:parentGroupPath:context:):ShapeLayer.swift">
|
|
98
|
+
</ContextState>
|
|
99
|
+
<ContextState
|
|
100
|
+
contextName = "CALayer.addRotationAnimation(from:context:):TransformAnimations.swift">
|
|
101
|
+
</ContextState>
|
|
102
|
+
<ContextState
|
|
103
|
+
contextName = "closure #4 in CALayer.makeGroupLayers(from:parentGroup:parentGroupPath:context:):ShapeLayer.swift">
|
|
104
|
+
</ContextState>
|
|
105
|
+
<ContextState
|
|
106
|
+
contextName = "GroupLayer.init(group:items:groupPath:context:):ShapeLayer.swift">
|
|
107
|
+
</ContextState>
|
|
108
|
+
<ContextState
|
|
109
|
+
contextName = "CALayer.addTransformAnimations(for:context:):TransformAnimations.swift">
|
|
110
|
+
</ContextState>
|
|
111
|
+
<ContextState
|
|
112
|
+
contextName = "CALayer.keyframeAnimation<τ_0_0, τ_0_1>(for:keyframes:value:context:):CALayer+addAnimation.swift">
|
|
69
113
|
</ContextState>
|
|
70
114
|
<ContextState
|
|
71
115
|
contextName = "CoreAnimationLayer.init(animation:imageProvider:fontProvider:compatibilityTrackerMode:logger:):CoreAnimationLayer.swift">
|
|
72
116
|
</ContextState>
|
|
73
117
|
<ContextState
|
|
74
|
-
contextName = "
|
|
118
|
+
contextName = "CoreAnimationLayer.display():CoreAnimationLayer.swift">
|
|
75
119
|
<PersistentStrings>
|
|
76
120
|
<PersistentString
|
|
77
|
-
value = "
|
|
121
|
+
value = "(superlayer!.delegate! as! UIView).superview!">
|
|
122
|
+
</PersistentString>
|
|
123
|
+
<PersistentString
|
|
124
|
+
value = "(superlayer!.delegate! as! UIView).window">
|
|
78
125
|
</PersistentString>
|
|
79
126
|
</PersistentStrings>
|
|
80
127
|
</ContextState>
|
|
81
128
|
<ContextState
|
|
82
|
-
contextName = "
|
|
83
|
-
</ContextState>
|
|
84
|
-
<ContextState
|
|
85
|
-
contextName = "CALayer.path<τ_0_0>(keyframes:value:):CALayer+addAnimation.swift">
|
|
129
|
+
contextName = "closure #1 in CAShapeLayer.addAnimations(for:context:pathMultiplier:transformPath:):CustomPathAnimation.swift">
|
|
86
130
|
<PersistentStrings>
|
|
87
131
|
<PersistentString
|
|
88
|
-
value = "UIBezierPath(cgPath:
|
|
132
|
+
value = "UIBezierPath(cgPath: pathKeyframe.cgPath())">
|
|
133
|
+
</PersistentString>
|
|
134
|
+
<PersistentString
|
|
135
|
+
value = "path.boundingBox">
|
|
89
136
|
</PersistentString>
|
|
90
137
|
</PersistentStrings>
|
|
91
138
|
</ContextState>
|
|
92
139
|
<ContextState
|
|
93
|
-
contextName = "
|
|
140
|
+
contextName = "CoreAnimationLayer.init(animation:imageProvider:textProvider:fontProvider:compatibilityTrackerMode:logger:):CoreAnimationLayer.swift">
|
|
141
|
+
</ContextState>
|
|
142
|
+
<ContextState
|
|
143
|
+
contextName = "closure #1 in CAShapeLayer.addAnimations(for:context:pathMultiplier:):RectangleAnimation.swift">
|
|
94
144
|
<PersistentStrings>
|
|
95
145
|
<PersistentString
|
|
96
|
-
value = "
|
|
146
|
+
value = "UIBezierPath(cgPath: BezierPath.rectangle(position: keyframe.position.pointValue, size: keyframe.size.sizeValue, cornerRadius: keyframe.cornerRadius.cgFloatValue, direction: rectangle.direction).cgPath())">
|
|
97
147
|
</PersistentString>
|
|
98
148
|
</PersistentStrings>
|
|
99
149
|
</ContextState>
|
|
@@ -101,10 +151,10 @@
|
|
|
101
151
|
contextName = "Collection<>.pairedLayersAndMasks(context:):CALayer+setupLayerHierarchy.swift">
|
|
102
152
|
</ContextState>
|
|
103
153
|
<ContextState
|
|
104
|
-
contextName = "
|
|
154
|
+
contextName = "closure #1 in MaskCompositionLayer.MaskLayer.setupAnimations(context:):MaskCompositionLayer.swift">
|
|
105
155
|
<PersistentStrings>
|
|
106
156
|
<PersistentString
|
|
107
|
-
value = "
|
|
157
|
+
value = "UIBezierPath(cgPath: maskPath)">
|
|
108
158
|
</PersistentString>
|
|
109
159
|
</PersistentStrings>
|
|
110
160
|
</ContextState>
|
|
@@ -112,27 +162,48 @@
|
|
|
112
162
|
contextName = "ShapeItemLayer.init(shape:otherItems:context:):ShapeItemLayer.swift">
|
|
113
163
|
</ContextState>
|
|
114
164
|
<ContextState
|
|
115
|
-
contextName = "
|
|
165
|
+
contextName = "CALayer.setupGroups(from:parentGroup:parentGroupPath:context:):ShapeLayer.swift">
|
|
166
|
+
</ContextState>
|
|
167
|
+
<ContextState
|
|
168
|
+
contextName = "BaseCompositionLayer.setupLayerAnimations(context:):BaseCompositionLayer.swift">
|
|
116
169
|
<PersistentStrings>
|
|
117
170
|
<PersistentString
|
|
118
|
-
value = "
|
|
171
|
+
value = "baseLayerModel.transform.rotation.keyframes.count > 1">
|
|
119
172
|
</PersistentString>
|
|
120
173
|
</PersistentStrings>
|
|
121
174
|
</ContextState>
|
|
122
175
|
<ContextState
|
|
123
|
-
contextName = "
|
|
176
|
+
contextName = "BaseCompositionLayer.setupAnimations(context:):BaseCompositionLayer.swift">
|
|
124
177
|
</ContextState>
|
|
125
178
|
<ContextState
|
|
126
|
-
contextName = "
|
|
179
|
+
contextName = "closure #1 in CAShapeLayer.addAnimations(for:context:pathMultiplier:):CombinedShapeAnimation.swift">
|
|
180
|
+
<PersistentStrings>
|
|
181
|
+
<PersistentString
|
|
182
|
+
value = "UIBezierPath(cgPath: combinedPath)">
|
|
183
|
+
</PersistentString>
|
|
184
|
+
</PersistentStrings>
|
|
127
185
|
</ContextState>
|
|
128
186
|
<ContextState
|
|
129
|
-
contextName = "
|
|
187
|
+
contextName = "ShapeNodeProperties.init(shape:):ShapeNode.swift">
|
|
188
|
+
<PersistentStrings>
|
|
189
|
+
<PersistentString
|
|
190
|
+
value = "UIBezierPath(cgPath: shape.path.keyframes[0].value.cgPath())">
|
|
191
|
+
</PersistentString>
|
|
192
|
+
</PersistentStrings>
|
|
130
193
|
</ContextState>
|
|
131
194
|
<ContextState
|
|
132
|
-
contextName = "
|
|
195
|
+
contextName = "GroupLayer.setupLayerHierarchy(context:):ShapeLayer.swift">
|
|
196
|
+
<PersistentStrings>
|
|
197
|
+
<PersistentString
|
|
198
|
+
value = "nonGroupItems">
|
|
199
|
+
</PersistentString>
|
|
200
|
+
<PersistentString
|
|
201
|
+
value = "items.shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems: !childGroups.isEmpty)">
|
|
202
|
+
</PersistentString>
|
|
203
|
+
</PersistentStrings>
|
|
133
204
|
</ContextState>
|
|
134
205
|
<ContextState
|
|
135
|
-
contextName = "
|
|
206
|
+
contextName = "closure #1 in Array<τ_0_0>.shapeRenderGroups.getter:ShapeLayer.swift">
|
|
136
207
|
</ContextState>
|
|
137
208
|
</ContextStates>
|
|
138
209
|
</VariablesViewState>
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcschemes/xcschememanagement.plist
CHANGED
|
@@ -25,6 +25,13 @@
|
|
|
25
25
|
<key>orderHint</key>
|
|
26
26
|
<integer>4</integer>
|
|
27
27
|
</dict>
|
|
28
|
+
<key>Tools for plug-in “FormatSwift”.xcscheme</key>
|
|
29
|
+
<dict>
|
|
30
|
+
<key>isShown</key>
|
|
31
|
+
<false/>
|
|
32
|
+
<key>orderHint</key>
|
|
33
|
+
<integer>8</integer>
|
|
34
|
+
</dict>
|
|
28
35
|
</dict>
|
|
29
36
|
</dict>
|
|
30
37
|
</plist>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>LottieAnimation.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>6</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>LottieAnimation.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
package/Package.resolved
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"object": {
|
|
3
|
+
"pins": [
|
|
4
|
+
{
|
|
5
|
+
"package": "AirbnbSwift",
|
|
6
|
+
"repositoryURL": "https://github.com/airbnb/swift",
|
|
7
|
+
"state": {
|
|
8
|
+
"branch": null,
|
|
9
|
+
"revision": "07bb2e0822ca6e464bf3610ed452568931fdbf65",
|
|
10
|
+
"version": "1.0.3"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"package": "swift-argument-parser",
|
|
15
|
+
"repositoryURL": "https://github.com/apple/swift-argument-parser",
|
|
16
|
+
"state": {
|
|
17
|
+
"branch": null,
|
|
18
|
+
"revision": "df9ee6676cd5b3bf5b330ec7568a5644f547201b",
|
|
19
|
+
"version": "1.1.3"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"version": 1
|
|
25
|
+
}
|
package/Package.swift
CHANGED
|
@@ -6,3 +6,8 @@ let package = Package(
|
|
|
6
6
|
platforms: [.iOS("11.0"), .macOS("10.10"), .tvOS("11.0")],
|
|
7
7
|
products: [.library(name: "Lottie", targets: ["Lottie"])],
|
|
8
8
|
targets: [.target(name: "Lottie", path: "Sources")])
|
|
9
|
+
|
|
10
|
+
#if swift(>=5.6)
|
|
11
|
+
// Add the Airbnb Swift formatting plugin if possible
|
|
12
|
+
package.dependencies.append(.package(url: "https://github.com/airbnb/swift", .upToNextMajor(from: "1.0.1")))
|
|
13
|
+
#endif
|
package/README.md
CHANGED
|
@@ -33,10 +33,20 @@ You can pull the [Lottie Github Repo](https://github.com/airbnb/lottie-ios/) and
|
|
|
33
33
|
|
|
34
34
|
### Swift Package Manager
|
|
35
35
|
|
|
36
|
-
To install Lottie using [Swift Package Manager](https://github.com/apple/swift-package-manager)
|
|
36
|
+
To install Lottie using [Swift Package Manager](https://github.com/apple/swift-package-manager) you can follow the [tutorial published by Apple](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) using the URL for the Lottie repo with the current version:
|
|
37
37
|
|
|
38
|
-
1. In Xcode, select “File” → “
|
|
39
|
-
1. Enter https://github.com/airbnb/lottie-
|
|
38
|
+
1. In Xcode, select “File” → “Add Packages...”
|
|
39
|
+
1. Enter https://github.com/airbnb/lottie-spm.git
|
|
40
|
+
|
|
41
|
+
or you can add the following dependency to your `Package.swift`:
|
|
42
|
+
|
|
43
|
+
```swift
|
|
44
|
+
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.1.1")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
When using Swift Package Manager we recommend using the [lottie-spm](https://github.com/airbnb/lottie-spm) repo instead of the main lottie-ios repo. The main git repository for [lottie-ios](https://github.com/airbnb/lottie-ios) is somewhat large (300+ MB), and Swift Package Manager always downloads the full repository with all git hsitory. The [lottie-spm](https://github.com/airbnb/lottie-spm) repo is much smaller (less than 500kb), so can be downloaded much more quickly.
|
|
48
|
+
|
|
49
|
+
Instead of downloading the full git history of Lottie and building it from source, the lottie-spm repo just contains a pointer to the precompiled XCFramework included in the [latest lottie-ios release](https://github.com/airbnb/lottie-ios/releases/latest) (typically ~8MB). If you prefer to include Lottie source directly your project, you can directly depend on the main lottie-ios repo by referencing `https://github.com/airbnb/lottie-ios.git` instead.
|
|
40
50
|
|
|
41
51
|
### CocoaPods
|
|
42
52
|
Add the pod to your Podfile:
|
|
@@ -52,6 +62,7 @@ After installing the cocoapod into your project import Lottie with
|
|
|
52
62
|
```swift
|
|
53
63
|
import Lottie
|
|
54
64
|
```
|
|
65
|
+
|
|
55
66
|
### Carthage
|
|
56
67
|
Add Lottie to your Cartfile:
|
|
57
68
|
```
|