lottie-ios 4.3.0 → 4.3.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/Lottie.xcodeproj/project.pbxproj +4 -0
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +50 -36
- package/README.md +1 -1
- package/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +3 -4
- package/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +5 -1
- package/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +19 -0
- package/Sources/Public/Animation/LottieAnimationView.swift +3 -3
- package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +4 -2
- package/lottie-ios.podspec +1 -1
- package/package.json +1 -1
|
@@ -330,6 +330,7 @@
|
|
|
330
330
|
0887347B28F0CCDD00458627 /* LottieAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0887347428F0CCDD00458627 /* LottieAnimationView.swift */; };
|
|
331
331
|
0887347C28F0CCDD00458627 /* LottieAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0887347428F0CCDD00458627 /* LottieAnimationView.swift */; };
|
|
332
332
|
0887347D28F0CCDD00458627 /* LottieAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0887347428F0CCDD00458627 /* LottieAnimationView.swift */; };
|
|
333
|
+
089C50C22ABA0C6D007903D3 /* LoggingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 089C50C12ABA0C6D007903D3 /* LoggingTests.swift */; };
|
|
333
334
|
08AB05552A61C20400DE86FD /* ReducedMotionOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08AB05542A61C20400DE86FD /* ReducedMotionOption.swift */; };
|
|
334
335
|
08AB05562A61C20400DE86FD /* ReducedMotionOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08AB05542A61C20400DE86FD /* ReducedMotionOption.swift */; };
|
|
335
336
|
08AB05572A61C20400DE86FD /* ReducedMotionOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08AB05542A61C20400DE86FD /* ReducedMotionOption.swift */; };
|
|
@@ -1176,6 +1177,7 @@
|
|
|
1176
1177
|
0887347228F0CCDD00458627 /* LottieAnimationHelpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LottieAnimationHelpers.swift; sourceTree = "<group>"; };
|
|
1177
1178
|
0887347328F0CCDD00458627 /* LottieAnimationViewInitializers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LottieAnimationViewInitializers.swift; sourceTree = "<group>"; };
|
|
1178
1179
|
0887347428F0CCDD00458627 /* LottieAnimationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LottieAnimationView.swift; sourceTree = "<group>"; };
|
|
1180
|
+
089C50C12ABA0C6D007903D3 /* LoggingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggingTests.swift; sourceTree = "<group>"; };
|
|
1179
1181
|
08AB05542A61C20400DE86FD /* ReducedMotionOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReducedMotionOption.swift; sourceTree = "<group>"; };
|
|
1180
1182
|
08AB05582A61C5B700DE86FD /* DecodingStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecodingStrategy.swift; sourceTree = "<group>"; };
|
|
1181
1183
|
08AB055C2A61C5CC00DE86FD /* RenderingEngineOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenderingEngineOption.swift; sourceTree = "<group>"; };
|
|
@@ -1755,6 +1757,7 @@
|
|
|
1755
1757
|
08CB2680291ED2B700B4F071 /* AnimationViewTests.swift */,
|
|
1756
1758
|
2E70F79E295BB6D30089A0EF /* CompatibleAnimationViewTests.swift */,
|
|
1757
1759
|
080F5FDB2AB1075000ADC32C /* TextProviderTests.swift */,
|
|
1760
|
+
089C50C12ABA0C6D007903D3 /* LoggingTests.swift */,
|
|
1758
1761
|
);
|
|
1759
1762
|
path = Tests;
|
|
1760
1763
|
sourceTree = "<group>";
|
|
@@ -3233,6 +3236,7 @@
|
|
|
3233
3236
|
2EAF59A727A076BC00E00531 /* Bundle+Module.swift in Sources */,
|
|
3234
3237
|
2E70F79F295BB6D30089A0EF /* CompatibleAnimationViewTests.swift in Sources */,
|
|
3235
3238
|
2E8044AE27A07347006E74CB /* Snapshotting+presentationLayer.swift in Sources */,
|
|
3239
|
+
089C50C22ABA0C6D007903D3 /* LoggingTests.swift in Sources */,
|
|
3236
3240
|
36E57EAC28AF7ADF00B7EFDA /* HardcodedTextProvider.swift in Sources */,
|
|
3237
3241
|
2E72128527BB32DB0027BC56 /* PerformanceTests.swift in Sources */,
|
|
3238
3242
|
6DB3BDC328245AA2002A276D /* ParsingTests.swift in Sources */,
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate
CHANGED
|
Binary file
|
package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
CHANGED
|
@@ -52,22 +52,6 @@
|
|
|
52
52
|
</Locations>
|
|
53
53
|
</BreakpointContent>
|
|
54
54
|
</BreakpointProxy>
|
|
55
|
-
<BreakpointProxy
|
|
56
|
-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
57
|
-
<BreakpointContent
|
|
58
|
-
uuid = "7317D33F-83F7-487F-92D8-361AFDC3108F"
|
|
59
|
-
shouldBeEnabled = "No"
|
|
60
|
-
ignoreCount = "0"
|
|
61
|
-
continueAfterRunningActions = "No"
|
|
62
|
-
filePath = "Sources/Private/CoreAnimation/Layers/AnimationLayer.swift"
|
|
63
|
-
startingColumnNumber = "9223372036854775807"
|
|
64
|
-
endingColumnNumber = "9223372036854775807"
|
|
65
|
-
startingLineNumber = "59"
|
|
66
|
-
endingLineNumber = "59"
|
|
67
|
-
landmarkName = "addingKeypathComponent(_:)"
|
|
68
|
-
landmarkType = "7">
|
|
69
|
-
</BreakpointContent>
|
|
70
|
-
</BreakpointProxy>
|
|
71
55
|
<BreakpointProxy
|
|
72
56
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
73
57
|
<BreakpointContent
|
|
@@ -79,8 +63,8 @@
|
|
|
79
63
|
filePath = "Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift"
|
|
80
64
|
startingColumnNumber = "9223372036854775807"
|
|
81
65
|
endingColumnNumber = "9223372036854775807"
|
|
82
|
-
startingLineNumber = "
|
|
83
|
-
endingLineNumber = "
|
|
66
|
+
startingLineNumber = "104"
|
|
67
|
+
endingLineNumber = "104"
|
|
84
68
|
landmarkName = "CALayer"
|
|
85
69
|
landmarkType = "21">
|
|
86
70
|
<Locations>
|
|
@@ -303,6 +287,21 @@
|
|
|
303
287
|
endingLineNumber = "412"
|
|
304
288
|
offsetFromSymbolStart = "127">
|
|
305
289
|
</Location>
|
|
290
|
+
<Location
|
|
291
|
+
uuid = "E5D4F221-8220-42A8-BB35-32D5BEE1328B - 12a91848e5910a61"
|
|
292
|
+
shouldBeEnabled = "Yes"
|
|
293
|
+
ignoreCount = "0"
|
|
294
|
+
continueAfterRunningActions = "No"
|
|
295
|
+
symbolName = "__C.UIView.systemLayoutFittingIntrinsicWidthFixedHeight(_: CoreGraphics.CGFloat, priority: __C.UILayoutPriority) -> __C.CGSize"
|
|
296
|
+
moduleName = "Lottie"
|
|
297
|
+
usesParentBreakpointCondition = "Yes"
|
|
298
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift"
|
|
299
|
+
startingColumnNumber = "9223372036854775807"
|
|
300
|
+
endingColumnNumber = "9223372036854775807"
|
|
301
|
+
startingLineNumber = "412"
|
|
302
|
+
endingLineNumber = "412"
|
|
303
|
+
offsetFromSymbolStart = "99">
|
|
304
|
+
</Location>
|
|
306
305
|
</Locations>
|
|
307
306
|
</BreakpointContent>
|
|
308
307
|
</BreakpointProxy>
|
|
@@ -412,6 +411,21 @@
|
|
|
412
411
|
endingLineNumber = "393"
|
|
413
412
|
offsetFromSymbolStart = "128">
|
|
414
413
|
</Location>
|
|
414
|
+
<Location
|
|
415
|
+
uuid = "7043C7FC-0028-426B-91A7-E05945E62122 - 94200cadb594d8f7"
|
|
416
|
+
shouldBeEnabled = "Yes"
|
|
417
|
+
ignoreCount = "0"
|
|
418
|
+
continueAfterRunningActions = "No"
|
|
419
|
+
symbolName = "__C.UIView.systemLayoutFittingIntrinsicHeightFixedWidth(_: CoreGraphics.CGFloat, priority: __C.UILayoutPriority) -> __C.CGSize"
|
|
420
|
+
moduleName = "Lottie"
|
|
421
|
+
usesParentBreakpointCondition = "Yes"
|
|
422
|
+
urlString = "file:///Users/calstephens/Documents/lottie/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift"
|
|
423
|
+
startingColumnNumber = "9223372036854775807"
|
|
424
|
+
endingColumnNumber = "9223372036854775807"
|
|
425
|
+
startingLineNumber = "393"
|
|
426
|
+
endingLineNumber = "393"
|
|
427
|
+
offsetFromSymbolStart = "97">
|
|
428
|
+
</Location>
|
|
415
429
|
</Locations>
|
|
416
430
|
</BreakpointContent>
|
|
417
431
|
</BreakpointProxy>
|
|
@@ -525,49 +539,49 @@
|
|
|
525
539
|
<BreakpointProxy
|
|
526
540
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
527
541
|
<BreakpointContent
|
|
528
|
-
uuid = "
|
|
542
|
+
uuid = "93EDC5AB-8948-4148-83CC-FDDCB8BE5AFE"
|
|
529
543
|
shouldBeEnabled = "No"
|
|
530
544
|
ignoreCount = "0"
|
|
531
545
|
continueAfterRunningActions = "No"
|
|
532
546
|
filePath = "Example/Example/AnimationPreviewView.swift"
|
|
533
547
|
startingColumnNumber = "9223372036854775807"
|
|
534
548
|
endingColumnNumber = "9223372036854775807"
|
|
535
|
-
startingLineNumber = "
|
|
536
|
-
endingLineNumber = "
|
|
537
|
-
landmarkName = "
|
|
538
|
-
landmarkType = "
|
|
549
|
+
startingLineNumber = "119"
|
|
550
|
+
endingLineNumber = "119"
|
|
551
|
+
landmarkName = "AnimationPreviewView"
|
|
552
|
+
landmarkType = "14">
|
|
539
553
|
</BreakpointContent>
|
|
540
554
|
</BreakpointProxy>
|
|
541
555
|
<BreakpointProxy
|
|
542
556
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
543
557
|
<BreakpointContent
|
|
544
|
-
uuid = "
|
|
558
|
+
uuid = "6054DF71-1266-422E-9C2F-56F48E5C9F70"
|
|
545
559
|
shouldBeEnabled = "Yes"
|
|
546
560
|
ignoreCount = "0"
|
|
547
561
|
continueAfterRunningActions = "No"
|
|
548
|
-
filePath = "
|
|
562
|
+
filePath = "Sources/Public/iOS/FilepathImageProvider.swift"
|
|
549
563
|
startingColumnNumber = "9223372036854775807"
|
|
550
564
|
endingColumnNumber = "9223372036854775807"
|
|
551
|
-
startingLineNumber = "
|
|
552
|
-
endingLineNumber = "
|
|
553
|
-
landmarkName = "
|
|
554
|
-
landmarkType = "
|
|
565
|
+
startingLineNumber = "40"
|
|
566
|
+
endingLineNumber = "40"
|
|
567
|
+
landmarkName = "imageForAsset(asset:)"
|
|
568
|
+
landmarkType = "7">
|
|
555
569
|
</BreakpointContent>
|
|
556
570
|
</BreakpointProxy>
|
|
557
571
|
<BreakpointProxy
|
|
558
572
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
559
573
|
<BreakpointContent
|
|
560
|
-
uuid = "
|
|
561
|
-
shouldBeEnabled = "
|
|
574
|
+
uuid = "8628051F-F131-475B-8FBA-5C9F7B7F9CF8"
|
|
575
|
+
shouldBeEnabled = "Yes"
|
|
562
576
|
ignoreCount = "0"
|
|
563
577
|
continueAfterRunningActions = "No"
|
|
564
|
-
filePath = "
|
|
578
|
+
filePath = "Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift"
|
|
565
579
|
startingColumnNumber = "9223372036854775807"
|
|
566
580
|
endingColumnNumber = "9223372036854775807"
|
|
567
|
-
startingLineNumber = "
|
|
568
|
-
endingLineNumber = "
|
|
569
|
-
landmarkName = "
|
|
570
|
-
landmarkType = "
|
|
581
|
+
startingLineNumber = "49"
|
|
582
|
+
endingLineNumber = "49"
|
|
583
|
+
landmarkName = "reloadImages()"
|
|
584
|
+
landmarkType = "7">
|
|
571
585
|
</BreakpointContent>
|
|
572
586
|
</BreakpointProxy>
|
|
573
587
|
</Breakpoints>
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ To install Lottie using [Swift Package Manager](https://github.com/apple/swift-p
|
|
|
41
41
|
or you can add the following dependency to your `Package.swift`:
|
|
42
42
|
|
|
43
43
|
```swift
|
|
44
|
-
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.3.
|
|
44
|
+
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.3.1")
|
|
45
45
|
```
|
|
46
46
|
|
|
47
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 history. The [lottie-spm](https://github.com/airbnb/lottie-spm) repo is much smaller (less than 500kb), so can be downloaded much more quickly.
|
|
@@ -50,15 +50,14 @@ extension CALayer {
|
|
|
50
50
|
guard !keyframes.isEmpty else { return nil }
|
|
51
51
|
|
|
52
52
|
// Check if this set of keyframes uses After Effects expressions, which aren't supported.
|
|
53
|
-
|
|
53
|
+
// - We only log this once per `CoreAnimationLayer` instance.
|
|
54
|
+
if keyframeGroup.unsupportedAfterEffectsExpression != nil, !context.loggingState.hasLoggedAfterEffectsExpressionsWarning {
|
|
55
|
+
context.loggingState.hasLoggedAfterEffectsExpressionsWarning = true
|
|
54
56
|
context.logger.info("""
|
|
55
57
|
`\(property.caLayerKeypath)` animation for "\(context.currentKeypath.fullPath)" \
|
|
56
58
|
includes an After Effects expression (https://helpx.adobe.com/after-effects/using/expression-language.html), \
|
|
57
59
|
which is not supported by lottie-ios (expressions are only supported by lottie-web). \
|
|
58
60
|
This animation may not play correctly.
|
|
59
|
-
|
|
60
|
-
\(unsupportedAfterEffectsExpression.replacingOccurrences(of: "\n", with: "\n "))
|
|
61
|
-
|
|
62
61
|
""")
|
|
63
62
|
}
|
|
64
63
|
|
|
@@ -209,6 +209,7 @@ final class CoreAnimationLayer: BaseAnimationLayer {
|
|
|
209
209
|
private let valueProviderStore: ValueProviderStore
|
|
210
210
|
private let compatibilityTracker: CompatibilityTracker
|
|
211
211
|
private let logger: LottieLogger
|
|
212
|
+
private let loggingState = LoggingState()
|
|
212
213
|
|
|
213
214
|
/// The current playback state of the animation that is displayed in this layer
|
|
214
215
|
private var currentPlaybackState: PlaybackState? {
|
|
@@ -265,6 +266,7 @@ final class CoreAnimationLayer: BaseAnimationLayer {
|
|
|
265
266
|
valueProviderStore: valueProviderStore,
|
|
266
267
|
compatibilityTracker: compatibilityTracker,
|
|
267
268
|
logger: logger,
|
|
269
|
+
loggingState: loggingState,
|
|
268
270
|
currentKeypath: AnimationKeypath(keys: []),
|
|
269
271
|
textProvider: textProvider,
|
|
270
272
|
recordHierarchyKeypath: configuration.recordHierarchyKeypath)
|
|
@@ -449,7 +451,9 @@ extension CoreAnimationLayer: RootAnimationLayer {
|
|
|
449
451
|
}
|
|
450
452
|
|
|
451
453
|
func forceDisplayUpdate() {
|
|
452
|
-
|
|
454
|
+
// Unimplemented
|
|
455
|
+
// - We can't call `display()` here, because it would cause unexpected frame animations:
|
|
456
|
+
// https://github.com/airbnb/lottie-ios/issues/2193
|
|
453
457
|
}
|
|
454
458
|
|
|
455
459
|
func logHierarchyKeypaths() {
|
|
@@ -38,6 +38,9 @@ struct LayerAnimationContext {
|
|
|
38
38
|
/// The logger that should be used for assertions and warnings
|
|
39
39
|
let logger: LottieLogger
|
|
40
40
|
|
|
41
|
+
/// Mutable state related to log events, stored on the `CoreAnimationLayer`.
|
|
42
|
+
let loggingState: LoggingState
|
|
43
|
+
|
|
41
44
|
/// The AnimationKeypath represented by the current layer
|
|
42
45
|
var currentKeypath: AnimationKeypath
|
|
43
46
|
|
|
@@ -84,3 +87,19 @@ struct LayerAnimationContext {
|
|
|
84
87
|
return copy
|
|
85
88
|
}
|
|
86
89
|
}
|
|
90
|
+
|
|
91
|
+
// MARK: - LoggingState
|
|
92
|
+
|
|
93
|
+
/// Mutable state related to log events, stored on the `CoreAnimationLayer`.
|
|
94
|
+
final class LoggingState {
|
|
95
|
+
|
|
96
|
+
// MARK: Lifecycle
|
|
97
|
+
|
|
98
|
+
init() { }
|
|
99
|
+
|
|
100
|
+
// MARK: Internal
|
|
101
|
+
|
|
102
|
+
/// Whether or not the warning about unsupported After Effects expressions
|
|
103
|
+
/// has been logged yet for this layer.
|
|
104
|
+
var hasLoggedAfterEffectsExpressionsWarning = false
|
|
105
|
+
}
|
|
@@ -794,6 +794,9 @@ open class LottieAnimationView: LottieAnimationViewBase {
|
|
|
794
794
|
|
|
795
795
|
// MARK: Internal
|
|
796
796
|
|
|
797
|
+
// The backing CALayer for this animation view.
|
|
798
|
+
let lottieAnimationLayer: LottieAnimationLayer
|
|
799
|
+
|
|
797
800
|
var animationLayer: RootAnimationLayer? {
|
|
798
801
|
lottieAnimationLayer.rootAnimationLayer
|
|
799
802
|
}
|
|
@@ -1029,8 +1032,5 @@ open class LottieAnimationView: LottieAnimationViewBase {
|
|
|
1029
1032
|
|
|
1030
1033
|
// MARK: Private
|
|
1031
1034
|
|
|
1032
|
-
// The backing CALayer for this animation view.
|
|
1033
|
-
private let lottieAnimationLayer: LottieAnimationLayer
|
|
1034
|
-
|
|
1035
1035
|
private let logger: LottieLogger
|
|
1036
1036
|
}
|
|
@@ -193,8 +193,10 @@ public final class CompatibleAnimationView: UIView {
|
|
|
193
193
|
commonInit()
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
required init?(coder
|
|
197
|
-
|
|
196
|
+
required init?(coder: NSCoder) {
|
|
197
|
+
animationView = LottieAnimationView()
|
|
198
|
+
super.init(coder: coder)
|
|
199
|
+
commonInit()
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
// MARK: Public
|
package/lottie-ios.podspec
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lottie-ios",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with bodymovin and renders the vector animations natively on mobile and through React Native!",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|