lottie-ios 4.5.0 → 4.6.0

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.
Files changed (226) hide show
  1. package/.claude/settings.local.json +10 -0
  2. package/.github/workflows/main.yml +37 -59
  3. package/Lottie.xcodeproj/project.pbxproj +14 -0
  4. package/Lottie.xcodeproj/project.xcworkspace/xcuserdata/cal_stephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  5. package/Lottie.xcworkspace/xcshareddata/swiftpm/Package.resolved +2 -2
  6. package/Lottie.xcworkspace/xcuserdata/cal_stephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  7. package/Lottie.xcworkspace/xcuserdata/cal_stephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +40 -0
  8. package/Package.resolved +2 -2
  9. package/Package.swift +14 -6
  10. package/README.md +3 -3
  11. package/Rakefile +32 -47
  12. package/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +57 -50
  13. package/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift +17 -9
  14. package/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift +14 -11
  15. package/Sources/Private/CoreAnimation/Animations/DropShadowAnimation.swift +32 -13
  16. package/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift +14 -10
  17. package/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +35 -23
  18. package/Sources/Private/CoreAnimation/Animations/LayerProperty.swift +79 -40
  19. package/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift +2 -1
  20. package/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift +15 -10
  21. package/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +22 -12
  22. package/Sources/Private/CoreAnimation/Animations/StarAnimation.swift +22 -19
  23. package/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +15 -5
  24. package/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +80 -43
  25. package/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift +4 -4
  26. package/Sources/Private/CoreAnimation/CompatibilityTracker.swift +6 -7
  27. package/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +69 -23
  28. package/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift +4 -5
  29. package/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift +67 -50
  30. package/Sources/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift +4 -4
  31. package/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +8 -8
  32. package/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift +5 -2
  33. package/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift +12 -12
  34. package/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift +9 -5
  35. package/Sources/Private/CoreAnimation/Layers/ImageLayer.swift +4 -3
  36. package/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift +2 -1
  37. package/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift +2 -1
  38. package/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift +4 -2
  39. package/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift +21 -6
  40. package/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift +28 -26
  41. package/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift +31 -23
  42. package/Sources/Private/CoreAnimation/Layers/SolidLayer.swift +2 -1
  43. package/Sources/Private/CoreAnimation/Layers/TextLayer.swift +47 -5
  44. package/Sources/Private/CoreAnimation/Layers/TransformLayer.swift +3 -1
  45. package/Sources/Private/CoreAnimation/ValueProviderStore.swift +11 -5
  46. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Diffing/Collection+Diff.swift +13 -9
  47. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Diffing/Diffable.swift +3 -2
  48. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Diffing/IndexChangeset.swift +7 -7
  49. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Diffing/SectionedChangeset.swift +0 -10
  50. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Logging/EpoxyLogger.swift +16 -16
  51. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelProperty.swift +2 -2
  52. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/AnyEpoxyModelProperty.swift +4 -2
  53. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DataIDProviding.swift +2 -1
  54. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidEndDisplayingProviding.swift +2 -1
  55. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift +2 -1
  56. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/StyleIDProviding.swift +2 -1
  57. package/Sources/Private/EmbeddedLibraries/EpoxyCore/README.md +1 -1
  58. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift +6 -9
  59. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift +16 -14
  60. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift +25 -15
  61. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift +6 -4
  62. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/StyledView.swift +3 -2
  63. package/Sources/Private/EmbeddedLibraries/LRUCache/LRUCache.swift +10 -9
  64. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+BackingConfiguration.swift +16 -10
  65. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Helpers.swift +51 -44
  66. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+MemoryFile.swift +27 -25
  67. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Reading.swift +14 -11
  68. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+ReadingDeprecated.swift +10 -9
  69. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Writing.swift +45 -32
  70. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+WritingDeprecated.swift +20 -16
  71. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+ZIP64.swift +32 -11
  72. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive.swift +24 -22
  73. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Data+Compression.swift +266 -38
  74. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Data+CompressionDeprecated.swift +6 -7
  75. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Data+Serialization.swift +10 -11
  76. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Entry+Serialization.swift +4 -2
  77. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Entry+ZIP64.swift +5 -4
  78. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Entry.swift +35 -16
  79. package/Sources/Private/EmbeddedLibraries/ZipFoundation/FileManager+ZIP.swift +16 -18
  80. package/Sources/Private/EmbeddedLibraries/ZipFoundation/URL+ZIP.swift +4 -2
  81. package/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift +16 -18
  82. package/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift +1 -1
  83. package/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +9 -8
  84. package/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift +5 -4
  85. package/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift +3 -2
  86. package/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift +78 -11
  87. package/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +55 -47
  88. package/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift +3 -5
  89. package/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift +9 -7
  90. package/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift +24 -59
  91. package/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +9 -10
  92. package/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift +5 -4
  93. package/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift +9 -2
  94. package/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift +9 -6
  95. package/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyValueContainer.swift +3 -3
  96. package/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueContainer.swift +1 -1
  97. package/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift +1 -1
  98. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/LayerEffectNodes/DropShadowNode.swift +1 -1
  99. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/LayerEffectNodes/LayerEffectNode.swift +2 -1
  100. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift +3 -3
  101. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift +7 -6
  102. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift +1 -1
  103. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift +1 -0
  104. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift +2 -2
  105. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift +1 -1
  106. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift +31 -24
  107. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift +16 -10
  108. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift +2 -2
  109. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +18 -14
  110. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +20 -17
  111. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift +70 -57
  112. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift +1 -2
  113. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +18 -16
  114. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +13 -18
  115. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +2 -4
  116. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +4 -6
  117. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +7 -9
  118. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +7 -8
  119. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +4 -5
  120. package/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift +8 -8
  121. package/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift +2 -2
  122. package/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift +7 -7
  123. package/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift +17 -17
  124. package/Sources/Private/Model/Assets/Asset.swift +2 -1
  125. package/Sources/Private/Model/Assets/AssetLibrary.swift +6 -6
  126. package/Sources/Private/Model/Assets/ImageAsset.swift +10 -2
  127. package/Sources/Private/Model/Assets/PrecompAsset.swift +9 -0
  128. package/Sources/Private/Model/DictionaryInitializable.swift +8 -10
  129. package/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift +1 -1
  130. package/Sources/Private/Model/Keyframes/KeyframeData.swift +4 -3
  131. package/Sources/Private/Model/Keyframes/KeyframeGroup.swift +23 -14
  132. package/Sources/Private/Model/LayerEffects/DropShadowEffect.swift +9 -0
  133. package/Sources/Private/Model/LayerEffects/EffectValues/ColorEffectValue.swift +9 -0
  134. package/Sources/Private/Model/LayerEffects/EffectValues/EffectValue.swift +3 -2
  135. package/Sources/Private/Model/LayerEffects/EffectValues/Vector1DEffectValue.swift +9 -0
  136. package/Sources/Private/Model/LayerEffects/LayerEffect.swift +3 -2
  137. package/Sources/Private/Model/LayerStyles/DropShadowStyle.swift +9 -0
  138. package/Sources/Private/Model/LayerStyles/LayerStyle.swift +3 -2
  139. package/Sources/Private/Model/Layers/ImageLayerModel.swift +9 -0
  140. package/Sources/Private/Model/Layers/LayerModel.swift +2 -2
  141. package/Sources/Private/Model/Layers/PreCompLayerModel.swift +9 -0
  142. package/Sources/Private/Model/Layers/ShapeLayerModel.swift +9 -0
  143. package/Sources/Private/Model/Layers/SolidLayerModel.swift +9 -0
  144. package/Sources/Private/Model/Layers/TextLayerModel.swift +9 -0
  145. package/Sources/Private/Model/Objects/Transform.swift +4 -3
  146. package/Sources/Private/Model/ShapeItems/Ellipse.swift +7 -0
  147. package/Sources/Private/Model/ShapeItems/Fill.swift +7 -0
  148. package/Sources/Private/Model/ShapeItems/GradientFill.swift +7 -0
  149. package/Sources/Private/Model/ShapeItems/GradientStroke.swift +11 -3
  150. package/Sources/Private/Model/ShapeItems/Group.swift +9 -0
  151. package/Sources/Private/Model/ShapeItems/Merge.swift +7 -0
  152. package/Sources/Private/Model/ShapeItems/Rectangle.swift +9 -0
  153. package/Sources/Private/Model/ShapeItems/Repeater.swift +9 -0
  154. package/Sources/Private/Model/ShapeItems/RoundedCorners.swift +9 -1
  155. package/Sources/Private/Model/ShapeItems/Shape.swift +9 -0
  156. package/Sources/Private/Model/ShapeItems/ShapeItem.swift +6 -6
  157. package/Sources/Private/Model/ShapeItems/ShapeTransform.swift +9 -0
  158. package/Sources/Private/Model/ShapeItems/Star.swift +7 -0
  159. package/Sources/Private/Model/ShapeItems/Stroke.swift +13 -3
  160. package/Sources/Private/Model/ShapeItems/Trim.swift +9 -2
  161. package/Sources/Private/Model/Text/TextDocument.swift +4 -0
  162. package/Sources/Private/RootAnimationLayer.swift +1 -0
  163. package/Sources/Private/Utility/Debugging/LayerDebugging.swift +15 -6
  164. package/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift +4 -4
  165. package/Sources/Private/Utility/Extensions/CGColor+RGB.swift +4 -2
  166. package/Sources/Private/Utility/Extensions/MathKit.swift +28 -17
  167. package/Sources/Private/Utility/Extensions/StringExtensions.swift +2 -1
  168. package/Sources/Private/Utility/Helpers/AnimationContext.swift +17 -14
  169. package/Sources/Private/Utility/Helpers/AnyEquatable.swift +4 -3
  170. package/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift +5 -2
  171. package/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift +2 -1
  172. package/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift +1 -1
  173. package/Sources/Private/Utility/Primitives/BezierPath.swift +18 -9
  174. package/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift +8 -3
  175. package/Sources/Private/Utility/Primitives/CompoundBezierPath.swift +4 -2
  176. package/Sources/Private/Utility/Primitives/CurveVertex.swift +11 -5
  177. package/Sources/Private/Utility/Primitives/PathElement.swift +5 -2
  178. package/Sources/Private/Utility/Primitives/UnitBezier.swift +5 -1
  179. package/Sources/Private/Utility/Primitives/VectorsExtensions.swift +13 -8
  180. package/Sources/Public/Animation/LottieAnimation.swift +2 -2
  181. package/Sources/Public/Animation/LottieAnimationHelpers.swift +48 -51
  182. package/Sources/Public/Animation/LottieAnimationLayer.swift +86 -47
  183. package/Sources/Public/Animation/LottieAnimationView.swift +55 -39
  184. package/Sources/Public/Animation/LottieAnimationViewInitializers.swift +20 -20
  185. package/Sources/Public/Animation/LottiePlaybackMode.swift +20 -14
  186. package/Sources/Public/Animation/LottieView.swift +39 -33
  187. package/Sources/Public/AnimationCache/DefaultAnimationCache.swift +2 -2
  188. package/Sources/Public/Configuration/LottieConfiguration.swift +9 -2
  189. package/Sources/Public/Configuration/LottieURLSession.swift +31 -0
  190. package/Sources/Public/Configuration/ReducedMotionOption.swift +6 -2
  191. package/Sources/Public/Configuration/RenderingEngineOption.swift +6 -2
  192. package/Sources/Public/Controls/AnimatedButton.swift +4 -3
  193. package/Sources/Public/Controls/AnimatedControl.swift +12 -9
  194. package/Sources/Public/Controls/AnimatedSwitch.swift +14 -14
  195. package/Sources/Public/Controls/LottieButton.swift +7 -10
  196. package/Sources/Public/Controls/LottieSwitch.swift +11 -12
  197. package/Sources/Public/DotLottie/Cache/DotLottieCache.swift +2 -2
  198. package/Sources/Public/DotLottie/DotLottieFile.swift +45 -13
  199. package/Sources/Public/DotLottie/DotLottieFileHelpers.swift +62 -49
  200. package/Sources/Public/DynamicProperties/AnyValueProvider.swift +2 -1
  201. package/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift +0 -2
  202. package/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift +0 -2
  203. package/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +5 -7
  204. package/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift +0 -2
  205. package/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift +0 -2
  206. package/Sources/Public/Keyframes/Interpolatable.swift +37 -31
  207. package/Sources/Public/Keyframes/Keyframe.swift +5 -5
  208. package/Sources/Public/Logging/LottieLogger.swift +18 -17
  209. package/Sources/Public/Primitives/LottieColor.swift +5 -5
  210. package/Sources/Public/Primitives/Vectors.swift +4 -4
  211. package/Sources/Public/TextProvider/AnimationTextProvider.swift +11 -0
  212. package/Sources/Public/iOS/BundleImageProvider.swift +1 -1
  213. package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +48 -39
  214. package/Sources/Public/iOS/FilepathImageProvider.swift +1 -1
  215. package/Sources/Public/iOS/LottieAnimationViewBase.swift +4 -2
  216. package/Sources/Public/iOS/UIColorExtension.swift +4 -1
  217. package/Sources/Public/macOS/BundleImageProvider.macOS.swift +1 -1
  218. package/Sources/Public/macOS/FilepathImageProvider.macOS.swift +1 -1
  219. package/Sources/Public/macOS/LottieAnimationViewBase.macOS.swift +1 -1
  220. package/Version.xcconfig +2 -2
  221. package/lottie-ios.podspec +1 -1
  222. package/package.json +1 -1
  223. package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/IDEFindNavigatorScopes.plist +0 -5
  224. package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  225. package/Lottie.xcworkspace/xcuserdata/calstephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -37
  226. /package/Lottie.xcodeproj/xcuserdata/{calstephens.xcuserdatad → cal_stephens.xcuserdatad}/xcschemes/xcschememanagement.plist +0 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(bundle exec rake:*)",
5
+ "Bash(bundle install:*)",
6
+ "Bash(bundle config:*)",
7
+ "Bash(cat:*)"
8
+ ]
9
+ }
10
+ }
@@ -7,34 +7,17 @@ on:
7
7
  branches: [ master ]
8
8
 
9
9
  jobs:
10
- build-package-no-visionOS:
11
- name: "Build Package"
12
- runs-on: macos-14
13
- strategy:
14
- fail-fast: false
15
- matrix:
16
- xcode:
17
- - '15.0.1' # Swift 5.9, but no visionOS support
18
- steps:
19
- - uses: actions/checkout@v2
20
- - uses: ./.github/actions/setup
21
- with:
22
- xcode: ${{ matrix.xcode }}
23
- - name: Build Package
24
- # Only Xcode 15.2 and later support visionOS, so exclude it on earlier versions.
25
- run: SKIP_VISION_OS=true bundle exec rake build:package:all
26
-
27
10
  build-package:
28
11
  name: "Build Package"
29
- runs-on: macos-14
12
+ runs-on: macos-15
30
13
  strategy:
31
14
  fail-fast: false
32
15
  matrix:
33
16
  xcode:
34
- - '15.2' # Swift 5.9
35
- - '15.3' # Swift 5.10
17
+ - '16.4' # Swift 6.1
18
+ - '26.1.1' # Swift 6.2
36
19
  steps:
37
- - uses: actions/checkout@v2
20
+ - uses: actions/checkout@v4
38
21
  - uses: ./.github/actions/setup
39
22
  with:
40
23
  xcode: ${{ matrix.xcode }}
@@ -44,23 +27,23 @@ jobs:
44
27
 
45
28
  build-example:
46
29
  name: "Build Example App"
47
- runs-on: macos-14
30
+ runs-on: macos-15
48
31
  steps:
49
- - uses: actions/checkout@v2
32
+ - uses: actions/checkout@v4
50
33
  - uses: ./.github/actions/setup
51
34
  with:
52
- xcode: '15.3' # Swift 5.10
35
+ xcode: '26.1.1' # Swift 6.2
53
36
  - name: Build Example
54
37
  run: bundle exec rake build:example:all
55
38
 
56
39
  test-package:
57
40
  name: "Test Package"
58
- runs-on: macos-14
41
+ runs-on: macos-15
59
42
  steps:
60
- - uses: actions/checkout@v2
43
+ - uses: actions/checkout@v4
61
44
  - uses: ./.github/actions/setup
62
45
  with:
63
- xcode: '15.3' # Swift 5.10
46
+ xcode: '16.4' # Swift 6.1
64
47
  - name: Test Package
65
48
  run: bundle exec rake test:package
66
49
  - name: Process test artifacts
@@ -68,16 +51,16 @@ jobs:
68
51
  run: bundle exec rake test:process
69
52
  - name: Upload artifacts
70
53
  if: always()
71
- uses: actions/upload-artifact@v2
54
+ uses: actions/upload-artifact@v4
72
55
  with:
73
56
  name: TestArtifacts
74
57
  path: Tests/Artifacts
75
58
 
76
59
  emerge-upload:
77
60
  name: "Emerge Upload"
78
- runs-on: macos-14
61
+ runs-on: macos-15
79
62
  steps:
80
- - uses: actions/checkout@v2
63
+ - uses: actions/checkout@v4
81
64
  - uses: ./.github/actions/setup
82
65
  - name: Build Package
83
66
  run: bundle exec rake emerge:upload
@@ -87,21 +70,14 @@ jobs:
87
70
 
88
71
  build-xcframework-minimum-supported-version:
89
72
  name: "Build XCFramework"
90
- runs-on: macos-14
73
+ runs-on: macos-15
91
74
  strategy:
92
75
  matrix:
93
76
  xcode:
94
- # XCFrameworks are forwards-compatible but not backwards-compatible.
95
- # The Xcode version we use for this job is that oldest Xcode version that
96
- # will be able to use these XCFrameworks and the lottie-spm package.
97
- # This should be the minimum Xcode version permitted by the App Store.
98
- # As of April 2024, this is Xcode 15.0: https://developer.apple.com/news/?id=fxu2qp7b
99
- # - However, testing in https://github.com/airbnb/lottie-spm/pull/12 shows that
100
- # Xcode 15.0 can use an XCFramework built by Xcode 15.2.
101
- - '15.2' # Swift 5.9, first Xcode version with visionOS support.
77
+ - '16.4' # Swift 6.1
102
78
  steps:
103
- - uses: actions/checkout@v2
104
- - uses: apple-actions/import-codesign-certs@v2
79
+ - uses: actions/checkout@v4
80
+ - uses: apple-actions/import-codesign-certs@v3
105
81
  continue-on-error: true
106
82
  with:
107
83
  p12-file-base64: ${{ secrets.SIGNING_CERTIFICATE_BASE_64 }}
@@ -109,23 +85,25 @@ jobs:
109
85
  - uses: ./.github/actions/setup
110
86
  with:
111
87
  xcode: ${{ matrix.xcode }}
112
- - name: Build XCFramework
113
- run: bundle exec rake build:xcframework[Lottie-Xcode-${{ matrix.xcode }}]
114
- - name: Upload XCFramework
115
- uses: actions/upload-artifact@v2
88
+ - name: Build Dynamic XCFramework
89
+ run: bundle exec rake build:xcframework\['dynamic'\]
90
+ - name: Build Static XCFramework
91
+ run: bundle exec rake build:xcframework\['static'\]
92
+ - name: Upload XCFrameworks
93
+ uses: actions/upload-artifact@v4
116
94
  with:
117
95
  name: BuildProducts
118
- path: .build/archives
96
+ path: .build/artifacts
119
97
 
120
98
  cocoapod:
121
99
  name: "Lint CocoaPods podspec"
122
- runs-on: macos-14
100
+ runs-on: macos-15
123
101
  strategy:
124
102
  matrix:
125
103
  xcode:
126
- - '15.3' # Swift 5.10
104
+ - '16.4' # Swift 6.1
127
105
  steps:
128
- - uses: actions/checkout@v2
106
+ - uses: actions/checkout@v4
129
107
  - uses: ./.github/actions/setup
130
108
  with:
131
109
  install-mint: false
@@ -135,13 +113,13 @@ jobs:
135
113
 
136
114
  spm-xcode-15:
137
115
  name: "Test Swift Package Manager"
138
- runs-on: macos-14
116
+ runs-on: macos-15
139
117
  strategy:
140
118
  matrix:
141
119
  xcode:
142
- - '15.3' # Swift 5.10
120
+ - '16.4' # Swift 6.1
143
121
  steps:
144
- - uses: actions/checkout@v2
122
+ - uses: actions/checkout@v4
145
123
  - uses: ./.github/actions/setup
146
124
  with:
147
125
  install-mint: true
@@ -151,31 +129,31 @@ jobs:
151
129
 
152
130
  carthage:
153
131
  name: "Test Carthage support"
154
- runs-on: macos-14
132
+ runs-on: macos-15
155
133
  steps:
156
- - uses: actions/checkout@v2
134
+ - uses: actions/checkout@v4
157
135
  - uses: ./.github/actions/setup
158
136
  with:
159
137
  install-mint: true
160
138
  install-carthage: true
161
- xcode: '15.3' # Swift 5.10
139
+ xcode: '26.1.1' # Swift 6.2
162
140
  - name: Test Carthage support
163
141
  run: bundle exec rake test:carthage
164
142
 
165
143
  swiftlint:
166
144
  name: "Lint Swift"
167
- runs-on: macos-14
145
+ runs-on: macos-15
168
146
  steps:
169
- - uses: actions/checkout@v2
147
+ - uses: actions/checkout@v4
170
148
  - uses: ./.github/actions/setup
171
149
  - name: Lint Swift
172
150
  run: bundle exec rake lint:swift
173
151
 
174
152
  embedded-libraries:
175
153
  name: "Lint Embedded Libraries"
176
- runs-on: macos-14
154
+ runs-on: macos-15
177
155
  steps:
178
- - uses: actions/checkout@v2
156
+ - uses: actions/checkout@v4
179
157
  - uses: ./.github/actions/setup
180
158
  - name: Lint Embedded Libraries
181
159
  run: bundle exec rake lint:EmbeddedLibraries
@@ -562,6 +562,8 @@
562
562
  19465F52282F998B00BB2C97 /* CachedImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19465F51282F998B00BB2C97 /* CachedImageProvider.swift */; };
563
563
  19465F53282F998B00BB2C97 /* CachedImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19465F51282F998B00BB2C97 /* CachedImageProvider.swift */; };
564
564
  19465F54282F998B00BB2C97 /* CachedImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19465F51282F998B00BB2C97 /* CachedImageProvider.swift */; };
565
+ 20439AE0516A49FDB3BA8D42 /* LottieURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */; };
566
+ 263C0AE32E5CA0D30063205E /* AnimationConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 263C0AE22E5CA0D30063205E /* AnimationConfigurationTests.swift */; };
565
567
  2E044E272820536800FA773B /* AutomaticEngineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E044E262820536800FA773B /* AutomaticEngineTests.swift */; };
566
568
  2E09FA0627B6CEB600BA84E5 /* HardcodedFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E09FA0527B6CEB600BA84E5 /* HardcodedFontProvider.swift */; };
567
569
  2E450DAC283415D500E56D19 /* OpacityAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E450DAB283415D500E56D19 /* OpacityAnimation.swift */; };
@@ -1076,6 +1078,7 @@
1076
1078
  2EAF5B0527A0798700E00531 /* AnimationFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EAF59F227A0798700E00531 /* AnimationFontProvider.swift */; };
1077
1079
  2EAF5B0627A0798700E00531 /* AnimationFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EAF59F227A0798700E00531 /* AnimationFontProvider.swift */; };
1078
1080
  36E57EAC28AF7ADF00B7EFDA /* HardcodedTextProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E57EAB28AF7ADF00B7EFDA /* HardcodedTextProvider.swift */; };
1081
+ 3E8B8C645ABC4C98B91F7B66 /* LottieURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */; };
1079
1082
  57210913291073E400169699 /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57210912291073E400169699 /* RoundedCorners.swift */; };
1080
1083
  57210914291073E400169699 /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57210912291073E400169699 /* RoundedCorners.swift */; };
1081
1084
  57210915291073E400169699 /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57210912291073E400169699 /* RoundedCorners.swift */; };
@@ -1137,6 +1140,7 @@
1137
1140
  A404605B2832C52B00ACFEDC /* BlendMode+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A40460582832C52B00ACFEDC /* BlendMode+Filter.swift */; };
1138
1141
  AB3278132A71BA0400A9C9F1 /* View+ValueChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3278122A71BA0400A9C9F1 /* View+ValueChanged.swift */; };
1139
1142
  AB3278142A71BA3500A9C9F1 /* View+ValueChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3278122A71BA0400A9C9F1 /* View+ValueChanged.swift */; };
1143
+ AB5FA114D9A847068F233099 /* LottieURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */; };
1140
1144
  AB87F02C2A72F5A80091D7B8 /* View+ValueChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3278122A71BA0400A9C9F1 /* View+ValueChanged.swift */; };
1141
1145
  AB87F02E2A72FA3A0091D7B8 /* Binding+Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB87F02D2A72FA3A0091D7B8 /* Binding+Map.swift */; };
1142
1146
  AB87F02F2A72FA3A0091D7B8 /* Binding+Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB87F02D2A72FA3A0091D7B8 /* Binding+Map.swift */; };
@@ -1144,6 +1148,7 @@
1144
1148
  ABF033B42A7B0ABA00F8C228 /* AnyEquatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF033B32A7B0ABA00F8C228 /* AnyEquatable.swift */; };
1145
1149
  ABF033B52A7B0ABA00F8C228 /* AnyEquatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF033B32A7B0ABA00F8C228 /* AnyEquatable.swift */; };
1146
1150
  ABF033B62A7B0ABA00F8C228 /* AnyEquatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF033B32A7B0ABA00F8C228 /* AnyEquatable.swift */; };
1151
+ ACC10C5D826649EABEBFB707 /* LottieURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */; };
1147
1152
  D453D8AB28FE6EE300D3F49C /* LottieAnimationCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = D453D8AA28FE6EE300D3F49C /* LottieAnimationCache.swift */; };
1148
1153
  D453D8AC28FE6EE300D3F49C /* LottieAnimationCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = D453D8AA28FE6EE300D3F49C /* LottieAnimationCache.swift */; };
1149
1154
  D453D8AD28FE6EE300D3F49C /* LottieAnimationCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = D453D8AA28FE6EE300D3F49C /* LottieAnimationCache.swift */; };
@@ -1273,7 +1278,9 @@
1273
1278
  08F8B212289990CB00CB5323 /* SnapshotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotTests.swift; sourceTree = "<group>"; };
1274
1279
  08FB47C52B23B86500744478 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Sources/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
1275
1280
  08FE934D28F4CCAC00D3A7E6 /* InfiniteOpaqueAnimationLayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfiniteOpaqueAnimationLayer.swift; sourceTree = "<group>"; };
1281
+ 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LottieURLSession.swift; sourceTree = "<group>"; };
1276
1282
  19465F51282F998B00BB2C97 /* CachedImageProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CachedImageProvider.swift; sourceTree = "<group>"; };
1283
+ 263C0AE22E5CA0D30063205E /* AnimationConfigurationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationConfigurationTests.swift; sourceTree = "<group>"; };
1277
1284
  2E044E262820536800FA773B /* AutomaticEngineTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomaticEngineTests.swift; sourceTree = "<group>"; };
1278
1285
  2E09FA0527B6CEB600BA84E5 /* HardcodedFontProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HardcodedFontProvider.swift; sourceTree = "<group>"; };
1279
1286
  2E450DAB283415D500E56D19 /* OpacityAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpacityAnimation.swift; sourceTree = "<group>"; };
@@ -1564,6 +1571,7 @@
1564
1571
  children = (
1565
1572
  2EAF59C727A0798700E00531 /* LottieConfiguration.swift */,
1566
1573
  08AB05542A61C20400DE86FD /* ReducedMotionOption.swift */,
1574
+ 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */,
1567
1575
  08AB05582A61C5B700DE86FD /* DecodingStrategy.swift */,
1568
1576
  08AB055C2A61C5CC00DE86FD /* RenderingEngineOption.swift */,
1569
1577
  );
@@ -1781,6 +1789,7 @@
1781
1789
  2E044E262820536800FA773B /* AutomaticEngineTests.swift */,
1782
1790
  6DB3BDB528243FA5002A276D /* ValueProvidersTests.swift */,
1783
1791
  D453D8AE28FF9BC600D3F49C /* AnimationCacheProviderTests.swift */,
1792
+ 263C0AE22E5CA0D30063205E /* AnimationConfigurationTests.swift */,
1784
1793
  08CB2680291ED2B700B4F071 /* AnimationViewTests.swift */,
1785
1794
  2E70F79E295BB6D30089A0EF /* CompatibleAnimationViewTests.swift */,
1786
1795
  080F5FDB2AB1075000ADC32C /* TextProviderTests.swift */,
@@ -2812,6 +2821,7 @@
2812
2821
  080DF0792A95717F00BE2D96 /* KeyframeExtensions.swift in Sources */,
2813
2822
  080DF0062A95712D00BE2D96 /* ShapeCompositionLayer.swift in Sources */,
2814
2823
  080DEF702A95709700BE2D96 /* ReducedMotionOption.swift in Sources */,
2824
+ 20439AE0516A49FDB3BA8D42 /* LottieURLSession.swift in Sources */,
2815
2825
  080DEFCF2A95711400BE2D96 /* URL+ZIP.swift in Sources */,
2816
2826
  080DEFEE2A95711E00BE2D96 /* TransformLayer.swift in Sources */,
2817
2827
  080DEFC52A95710F00BE2D96 /* ViewType.swift in Sources */,
@@ -3051,6 +3061,7 @@
3051
3061
  2EAF5A9B27A0798700E00531 /* BundleImageProvider.macOS.swift in Sources */,
3052
3062
  2E9C969F2822F43100677516 /* TextAnimatorNode.swift in Sources */,
3053
3063
  08AB05552A61C20400DE86FD /* ReducedMotionOption.swift in Sources */,
3064
+ 3E8B8C645ABC4C98B91F7B66 /* LottieURLSession.swift in Sources */,
3054
3065
  2EAF5AFB27A0798700E00531 /* SizeValueProvider.swift in Sources */,
3055
3066
  2E9C97562822F43100677516 /* MathKit.swift in Sources */,
3056
3067
  2E9C96902822F43100677516 /* EllipseNode.swift in Sources */,
@@ -3289,6 +3300,7 @@
3289
3300
  080F5FDC2AB1075000ADC32C /* TextProviderTests.swift in Sources */,
3290
3301
  6DB3BDB628243FA5002A276D /* ValueProvidersTests.swift in Sources */,
3291
3302
  2E72128327BB329C0027BC56 /* AnimationKeypathTests.swift in Sources */,
3303
+ 263C0AE32E5CA0D30063205E /* AnimationConfigurationTests.swift in Sources */,
3292
3304
  2E044E272820536800FA773B /* AutomaticEngineTests.swift in Sources */,
3293
3305
  D453D8AF28FF9BC600D3F49C /* AnimationCacheProviderTests.swift in Sources */,
3294
3306
  );
@@ -3545,6 +3557,7 @@
3545
3557
  2E9C96E82822F43100677516 /* ImageLayer.swift in Sources */,
3546
3558
  2E9C972D2822F43100677516 /* StarAnimation.swift in Sources */,
3547
3559
  08AB05562A61C20400DE86FD /* ReducedMotionOption.swift in Sources */,
3560
+ AB5FA114D9A847068F233099 /* LottieURLSession.swift in Sources */,
3548
3561
  2E9C96E22822F43100677516 /* LayerModel+makeAnimationLayer.swift in Sources */,
3549
3562
  08E207372A56014E002DCE17 /* MakeViewProviding.swift in Sources */,
3550
3563
  2E9C96A92822F43100677516 /* FillNode.swift in Sources */,
@@ -3655,6 +3668,7 @@
3655
3668
  2E9C96A12822F43100677516 /* TextAnimatorNode.swift in Sources */,
3656
3669
  2EAF5AFD27A0798700E00531 /* SizeValueProvider.swift in Sources */,
3657
3670
  08AB05572A61C20400DE86FD /* ReducedMotionOption.swift in Sources */,
3671
+ ACC10C5D826649EABEBFB707 /* LottieURLSession.swift in Sources */,
3658
3672
  2E9C97582822F43100677516 /* MathKit.swift in Sources */,
3659
3673
  2E9C96922822F43100677516 /* EllipseNode.swift in Sources */,
3660
3674
  2E9C975B2822F43100677516 /* BezierPath.swift in Sources */,
@@ -14,8 +14,8 @@
14
14
  "kind" : "remoteSourceControl",
15
15
  "location" : "https://github.com/airbnb/swift",
16
16
  "state" : {
17
- "revision" : "6900f5ab7ab7394ac85eb9da52b2528ee329b206",
18
- "version" : "1.0.4"
17
+ "revision" : "6c09dd57c2254b14bb48c15e209ed6e93058104f",
18
+ "version" : "1.2.0"
19
19
  }
20
20
  },
21
21
  {
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Bucket
3
+ uuid = "556BBD44-725D-4E33-8C4A-B856B64FA389"
4
+ type = "0"
5
+ version = "2.0">
6
+ <Breakpoints>
7
+ <BreakpointProxy
8
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
9
+ <BreakpointContent
10
+ uuid = "DC0FA7C6-C142-48E0-BF38-CF4CBB46B0F7"
11
+ shouldBeEnabled = "Yes"
12
+ ignoreCount = "0"
13
+ continueAfterRunningActions = "No"
14
+ filePath = "Sources/Public/Animation/LottieAnimationView.swift"
15
+ startingColumnNumber = "9223372036854775807"
16
+ endingColumnNumber = "9223372036854775807"
17
+ startingLineNumber = "365"
18
+ endingLineNumber = "365"
19
+ landmarkName = "setPlaybackMode(_:completion:)"
20
+ landmarkType = "7">
21
+ </BreakpointContent>
22
+ </BreakpointProxy>
23
+ <BreakpointProxy
24
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
25
+ <BreakpointContent
26
+ uuid = "874695D5-65F4-4004-AD94-7756EF6E265E"
27
+ shouldBeEnabled = "Yes"
28
+ ignoreCount = "0"
29
+ continueAfterRunningActions = "No"
30
+ filePath = "Sources/Private/CoreAnimation/CoreAnimationLayer.swift"
31
+ startingColumnNumber = "9223372036854775807"
32
+ endingColumnNumber = "9223372036854775807"
33
+ startingLineNumber = "177"
34
+ endingLineNumber = "177"
35
+ landmarkName = "display()"
36
+ landmarkType = "7">
37
+ </BreakpointContent>
38
+ </BreakpointProxy>
39
+ </Breakpoints>
40
+ </Bucket>
package/Package.resolved CHANGED
@@ -5,8 +5,8 @@
5
5
  "kind" : "remoteSourceControl",
6
6
  "location" : "https://github.com/airbnb/swift",
7
7
  "state" : {
8
- "revision" : "fa3ae574d0b9c93a1655424bd4381044274c5cb4",
9
- "version" : "1.0.7"
8
+ "revision" : "6c09dd57c2254b14bb48c15e209ed6e93058104f",
9
+ "version" : "1.2.0"
10
10
  }
11
11
  },
12
12
  {
package/Package.swift CHANGED
@@ -1,13 +1,18 @@
1
- // swift-tools-version:5.9
1
+ // swift-tools-version:6.0
2
2
  import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "Lottie",
6
6
  // Minimum platform versions should be kept in sync with the per-platform targets in Lottie.xcodeproj, lottie-ios.podspec, and lottie-spm's Package.swift
7
- platforms: [.iOS("13.0"), .macOS("10.15"), .tvOS("13.0"), .custom("visionOS", versionString: "1.0")],
8
- products: [.library(name: "Lottie", targets: ["Lottie"])],
7
+ platforms: [.iOS("13.0"), .macOS("10.15"), .tvOS("13.0"), .visionOS("1.0")],
8
+ products: [
9
+ .library(name: "Lottie", targets: ["Lottie"]),
10
+ // Product for dynamic linking, as SPM builds libraries statically by default.
11
+ // This product should be used in a modular project structure with multiple packages using Lottie to avoid duplicate symbols.
12
+ .library(name: "Lottie-Dynamic", type: .dynamic, targets: ["Lottie"]),
13
+ ],
9
14
  dependencies: [
10
- .package(url: "https://github.com/airbnb/swift", .upToNextMajor(from: "1.0.1")),
15
+ .package(url: "https://github.com/airbnb/swift", .upToNextMajor(from: "1.2.0"))
11
16
  ],
12
17
  targets: [
13
18
  .target(
@@ -19,5 +24,8 @@ let package = Package(
19
24
  "Private/EmbeddedLibraries/EpoxyCore/README.md",
20
25
  "Private/EmbeddedLibraries/LRUCache/README.md",
21
26
  ],
22
- resources: [.copy("PrivacyInfo.xcprivacy")]),
23
- ])
27
+ resources: [.copy("PrivacyInfo.xcprivacy")],
28
+ swiftSettings: [.swiftLanguageMode(.v5)]
29
+ )
30
+ ]
31
+ )
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Lottie is a cross-platform library for iOS, macOS, tvOS, visionOS, [Android](https://github.com/airbnb/lottie-android), and [Web](https://github.com/airbnb/lottie-web) that natively renders vector-based animations and art in realtime with minimal code.
7
7
 
8
- Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with [bodymovin](https://github.com/bodymovin/bodymovin), Sketch with [Lottie Sketch Export](https://github.com/buba447/Lottie-Sketch-Export), and from [Haiku](https://www.haiku.ai).
8
+ Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with [bodymovin](https://github.com/bodymovin/bodymovin), Sketch with [Lottie Sketch Export](https://github.com/buba447/Lottie-Sketch-Export), and from [Haiku](https://www.haikuanimator.com).
9
9
 
10
10
  Designers can create **and ship** beautiful animations without an engineer painstakingly recreating them by hand.
11
11
  Since the animations are backed by JSON, they are extremely small in size but can be large in complexity!
@@ -33,7 +33,7 @@ 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) 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:
36
+ To install Lottie using [Swift Package Manager](https://github.com/swiftlang/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
38
  1. In Xcode, select “File” → “Add Packages...”
39
39
  1. Enter https://github.com/airbnb/lottie-spm.git
@@ -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.5.0")
44
+ .package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.5.2")
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.
package/Rakefile CHANGED
@@ -27,9 +27,7 @@ namespace :build do
27
27
 
28
28
  desc 'Builds the Lottie package for visionOS'
29
29
  task :visionOS do
30
- ifVisionOSEnabled {
31
- xcodebuild('build -scheme "Lottie (visionOS)" -destination generic/platform=visionOS -workspace Lottie.xcworkspace OTHER_SWIFT_FLAGS="-warnings-as-errors"')
32
- }
30
+ xcodebuild('build -scheme "Lottie (visionOS)" -destination generic/platform=visionOS -workspace Lottie.xcworkspace OTHER_SWIFT_FLAGS="-warnings-as-errors"')
33
31
  end
34
32
  end
35
33
 
@@ -55,30 +53,34 @@ namespace :build do
55
53
 
56
54
  desc 'Builds the visionOS Lottie Example app'
57
55
  task :visionOS do
58
- ifVisionOSEnabled {
59
- xcodebuild('build -scheme "Example (Multiplatform)" -destination "platform=visionOS Simulator,name=Apple Vision Pro" -workspace Lottie.xcworkspace')
60
- }
56
+ xcodebuild('build -scheme "Example (Multiplatform)" -destination "platform=visionOS Simulator,OS=26.1,name=Apple Vision Pro" -workspace Lottie.xcworkspace')
61
57
  end
62
58
  end
63
59
 
64
60
  desc 'Builds an xcframework for all supported platforms'
65
- task :xcframework, [:zip_archive_name] do |_t, args|
66
- args.with_defaults(:zip_archive_name => 'Lottie')
61
+ task :xcframework, [:framework_type] do |_t, args|
62
+ args.with_defaults(:framework_type => 'dynamic')
63
+
64
+ case args[:framework_type]
65
+ when 'dynamic'
66
+ mach_o_type = 'mh_dylib'
67
+ xcframework_name = 'Lottie' # Backward compatibility
68
+ when 'static'
69
+ mach_o_type = 'staticlib'
70
+ xcframework_name = 'Lottie-Static'
71
+ end
67
72
 
68
73
  sh 'rm -rf .build/archives'
69
74
 
70
75
  # Build the framework for each supported platform, including simulators
71
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (iOS)" -destination generic/platform=iOS -archivePath ".build/archives/Lottie_iOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
72
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (iOS)" -destination "generic/platform=iOS Simulator" -archivePath ".build/archives/Lottie_iOS_Simulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
73
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (iOS)" -destination "generic/platform=macOS,variant=Mac Catalyst" -archivePath ".build/archives/Lottie_Mac_Catalyst" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
74
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (macOS)" -destination generic/platform=macOS -archivePath ".build/archives/Lottie_macOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
75
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (tvOS)" -destination generic/platform=tvOS -archivePath ".build/archives/Lottie_tvOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
76
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (tvOS)" -destination "generic/platform=tvOS Simulator" -archivePath ".build/archives/Lottie_tvOS_Simulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
77
-
78
- ifVisionOSEnabled {
79
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (visionOS)" -destination generic/platform=visionOS -archivePath ".build/archives/Lottie_visionOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
80
- xcodebuild('archive -workspace Lottie.xcworkspace -scheme "Lottie (visionOS)" -destination "generic/platform=visionOS Simulator" -archivePath ".build/archives/Lottie_visionOS_Simulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO')
81
- }
76
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (iOS)\" -destination generic/platform=iOS -archivePath \".build/archives/Lottie_iOS\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
77
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (iOS)\" -destination \"generic/platform=iOS Simulator\" -archivePath \".build/archives/Lottie_iOS_Simulator\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
78
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (iOS)\" -destination \"generic/platform=macOS,variant=Mac Catalyst\" -archivePath \".build/archives/Lottie_Mac_Catalyst\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
79
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (macOS)\" -destination generic/platform=macOS -archivePath \".build/archives/Lottie_macOS\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
80
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (tvOS)\" -destination generic/platform=tvOS -archivePath \".build/archives/Lottie_tvOS\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
81
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (tvOS)\" -destination \"generic/platform=tvOS Simulator\" -archivePath \".build/archives/Lottie_tvOS_Simulator\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
82
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (visionOS)\" -destination generic/platform=visionOS -archivePath \".build/archives/Lottie_visionOS\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
83
+ xcodebuild("archive -workspace Lottie.xcworkspace -scheme \"Lottie (visionOS)\" -destination \"generic/platform=visionOS Simulator\" -archivePath \".build/archives/Lottie_visionOS_Simulator\" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES ENABLE_BITCODE=NO SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO MACH_O_TYPE=\"#{mach_o_type}\"")
82
84
 
83
85
  # Combine all of the platforms into a single XCFramework
84
86
  xcframeworkInvocation = [
@@ -89,18 +91,14 @@ namespace :build do
89
91
  '-archive .build/archives/Lottie_tvOS.xcarchive -framework Lottie.framework',
90
92
  '-archive .build/archives/Lottie_tvOS_Simulator.xcarchive -framework Lottie.framework',
91
93
  '-archive .build/archives/Lottie_macOS.xcarchive -framework Lottie.framework',
94
+ '-archive .build/archives/Lottie_visionOS.xcarchive -framework Lottie.framework',
95
+ '-archive .build/archives/Lottie_visionOS_Simulator.xcarchive -framework Lottie.framework',
96
+ "-output .build/artifacts/#{xcframework_name}.xcframework",
92
97
  ]
93
98
 
94
- ifVisionOSEnabled {
95
- xcframeworkInvocation.push('-archive .build/archives/Lottie_visionOS.xcarchive -framework Lottie.framework')
96
- xcframeworkInvocation.push('-archive .build/archives/Lottie_visionOS_Simulator.xcarchive -framework Lottie.framework')
97
- }
98
-
99
- xcframeworkInvocation.push('-output .build/archives/Lottie.xcframework')
100
-
101
99
  xcodebuild(xcframeworkInvocation.join(" "))
102
100
 
103
- Dir.chdir('.build/archives') do
101
+ Dir.chdir('.build/artifacts') do
104
102
  # Codesign the XCFramework using the "Lottie iOS" certificate, which should be installed in the keychain.
105
103
  # - Check to make sure the certificate is installed before attemtping to codesign.
106
104
  # - In GitHub actions CI, only jobs run by contibutors have access to repo secrets,
@@ -110,19 +108,19 @@ namespace :build do
110
108
  `security find-certificate -c 'Lottie iOS'`
111
109
  if $?.success?
112
110
  puts "Signing certificate is installed. Code signing Lottie.xcframework."
113
- sh 'codesign --timestamp -v --sign "Lottie iOS" Lottie.xcframework'
111
+ sh "codesign --timestamp -v --sign \"Lottie iOS\" #{xcframework_name}.xcframework"
114
112
  else
115
- puts "Signing certificate is not installed. Lottie.xcframework will not be code signed."
113
+ puts "Signing certificate is not installed. #{xcframework_name}.xcframework will not be code signed."
116
114
  end
117
115
 
118
116
  # Archive the XCFramework into a zip file
119
117
  # Use --symlinks to avoid "Multiple binaries share the same codesign path. This can happen if your build process copies frameworks by following symlinks."
120
118
  # error when validating macOS apps (#1948)
121
- sh "zip -r --symlinks #{args[:zip_archive_name]}.xcframework.zip Lottie.xcframework"
122
- sh 'rm -rf Lottie.xcframework'
119
+ sh "zip -r --symlinks #{xcframework_name}.xcframework.zip #{xcframework_name}.xcframework"
120
+ sh "rm -rf #{xcframework_name}.xcframework"
123
121
  end
124
122
 
125
- sh "swift package compute-checksum .build/archives/#{args[:zip_archive_name]}.xcframework.zip"
123
+ sh "swift package compute-checksum .build/artifacts/#{xcframework_name}.xcframework.zip"
126
124
  end
127
125
  end
128
126
 
@@ -158,7 +156,7 @@ namespace :test do
158
156
  xcodebuild('build -scheme CarthageTest -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)"')
159
157
  xcodebuild('build -scheme CarthageTest -destination generic/platform=macOS')
160
158
  xcodebuild('build -scheme CarthageTest -destination "platform=tvOS Simulator,name=Apple TV"')
161
- xcodebuild('build -scheme CarthageTest -destination "platform=visionOS Simulator,name=Apple Vision Pro"')
159
+ xcodebuild('build -scheme CarthageTest -destination "platform=visionOS Simulator,OS=26.1,name=Apple Vision Pro"')
162
160
  end
163
161
  end
164
162
 
@@ -169,10 +167,7 @@ namespace :test do
169
167
  xcodebuild('build -scheme "Lottie" -destination generic/platform=iOS')
170
168
  xcodebuild('build -scheme "Lottie" -destination generic/platform=macOS')
171
169
  xcodebuild('build -scheme "Lottie" -destination generic/platform=tvOS')
172
-
173
- ifVisionOSEnabled {
174
- xcodebuild('build -scheme "Lottie" -destination generic/platform=visionOS')
175
- }
170
+ xcodebuild('build -scheme "Lottie" -destination generic/platform=visionOS')
176
171
  end
177
172
  end
178
173
  end
@@ -247,13 +242,3 @@ def xcodebuild(command)
247
242
  sh "xcodebuild #{command}"
248
243
  end
249
244
  end
250
-
251
- # Runs the given code block, unless `SKIP_VISION_OS=true`.
252
- # TODO: Remove this once Lottie only supports Xcode 15.2+.
253
- def ifVisionOSEnabled
254
- if ENV["SKIP_VISION_OS"] == "true"
255
- puts "Skipping visionOS build"
256
- else
257
- yield
258
- end
259
- end