lottie-ios 4.4.0 → 4.4.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.
@@ -27,7 +27,7 @@ jobs:
27
27
 
28
28
  build-package:
29
29
  name: "Build Package"
30
- runs-on: macos-13
30
+ runs-on: macos-14
31
31
  strategy:
32
32
  fail-fast: false
33
33
  matrix:
@@ -44,7 +44,7 @@ jobs:
44
44
 
45
45
  build-example:
46
46
  name: "Build Example App"
47
- runs-on: macos-13
47
+ runs-on: macos-14
48
48
  steps:
49
49
  - uses: actions/checkout@v2
50
50
  - uses: ./.github/actions/setup
@@ -55,7 +55,7 @@ jobs:
55
55
 
56
56
  test-package:
57
57
  name: "Test Package"
58
- runs-on: macos-13
58
+ runs-on: macos-14
59
59
  steps:
60
60
  - uses: actions/checkout@v2
61
61
  - uses: ./.github/actions/setup
@@ -75,7 +75,7 @@ jobs:
75
75
 
76
76
  emerge-upload:
77
77
  name: "Emerge Upload"
78
- runs-on: macos-13
78
+ runs-on: macos-14
79
79
  steps:
80
80
  - uses: actions/checkout@v2
81
81
  - uses: ./.github/actions/setup
@@ -121,7 +121,7 @@ jobs:
121
121
 
122
122
  build-xcframework-with-visionOS-support:
123
123
  name: "Build XCFramework"
124
- runs-on: macos-13
124
+ runs-on: macos-14
125
125
  strategy:
126
126
  matrix:
127
127
  xcode:
@@ -146,7 +146,7 @@ jobs:
146
146
 
147
147
  cocoapod:
148
148
  name: "Lint CocoaPods podspec"
149
- runs-on: macos-13
149
+ runs-on: macos-14
150
150
  steps:
151
151
  - uses: actions/checkout@v2
152
152
  - uses: ./.github/actions/setup
@@ -157,7 +157,7 @@ jobs:
157
157
 
158
158
  spm-xcode-15:
159
159
  name: "Test Swift Package Manager"
160
- runs-on: macos-13
160
+ runs-on: macos-14
161
161
  strategy:
162
162
  matrix:
163
163
  xcode:
@@ -173,7 +173,7 @@ jobs:
173
173
 
174
174
  carthage:
175
175
  name: "Test Carthage support"
176
- runs-on: macos-13
176
+ runs-on: macos-14
177
177
  steps:
178
178
  - uses: actions/checkout@v2
179
179
  - uses: ./.github/actions/setup
@@ -186,7 +186,7 @@ jobs:
186
186
 
187
187
  swiftlint:
188
188
  name: "Lint Swift"
189
- runs-on: macos-13
189
+ runs-on: macos-14
190
190
  steps:
191
191
  - uses: actions/checkout@v2
192
192
  - uses: ./.github/actions/setup
@@ -195,7 +195,7 @@ jobs:
195
195
 
196
196
  embedded-libraries:
197
197
  name: "Lint Embedded Libraries"
198
- runs-on: macos-13
198
+ runs-on: macos-14
199
199
  steps:
200
200
  - uses: actions/checkout@v2
201
201
  - uses: ./.github/actions/setup
package/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org' do
2
- gem 'cocoapods', '~> 1.11.0'
2
+ gem 'cocoapods', '~> 1.15.0'
3
3
  gem "rake", "~> 13.0.0"
4
4
  gem 'git', '~> 1.18'
5
5
  end
package/Gemfile.lock CHANGED
@@ -4,9 +4,9 @@ GEM
4
4
  GEM
5
5
  remote: https://rubygems.org/
6
6
  specs:
7
- CFPropertyList (3.0.5)
7
+ CFPropertyList (3.0.6)
8
8
  rexml
9
- activesupport (6.1.4.1)
9
+ activesupport (6.1.7.6)
10
10
  concurrent-ruby (~> 1.0, >= 1.0.2)
11
11
  i18n (>= 1.6, < 2)
12
12
  minitest (>= 5.1)
@@ -18,16 +18,16 @@ GEM
18
18
  httpclient (~> 2.8, >= 2.8.3)
19
19
  json (>= 1.5.1)
20
20
  atomos (0.1.3)
21
- claide (1.0.3)
22
- cocoapods (1.11.2)
21
+ claide (1.1.0)
22
+ cocoapods (1.15.0)
23
23
  addressable (~> 2.8)
24
24
  claide (>= 1.0.2, < 2.0)
25
- cocoapods-core (= 1.11.2)
25
+ cocoapods-core (= 1.15.0)
26
26
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
27
- cocoapods-downloader (>= 1.4.0, < 2.0)
27
+ cocoapods-downloader (>= 2.1, < 3.0)
28
28
  cocoapods-plugins (>= 1.0.0, < 2.0)
29
29
  cocoapods-search (>= 1.0.0, < 2.0)
30
- cocoapods-trunk (>= 1.4.0, < 2.0)
30
+ cocoapods-trunk (>= 1.6.0, < 2.0)
31
31
  cocoapods-try (>= 1.1.0, < 2.0)
32
32
  colored2 (~> 3.1)
33
33
  escape (~> 0.0.4)
@@ -35,10 +35,10 @@ GEM
35
35
  gh_inspector (~> 1.0)
36
36
  molinillo (~> 0.8.0)
37
37
  nap (~> 1.0)
38
- ruby-macho (>= 1.0, < 3.0)
39
- xcodeproj (>= 1.21.0, < 2.0)
40
- cocoapods-core (1.11.2)
41
- activesupport (>= 5.0, < 7)
38
+ ruby-macho (>= 2.3.0, < 3.0)
39
+ xcodeproj (>= 1.23.0, < 2.0)
40
+ cocoapods-core (1.15.0)
41
+ activesupport (>= 5.0, < 8)
42
42
  addressable (~> 2.8)
43
43
  algoliasearch (~> 1.0)
44
44
  concurrent-ruby (~> 1.1)
@@ -48,7 +48,7 @@ GEM
48
48
  public_suffix (~> 4.0)
49
49
  typhoeus (~> 1.0)
50
50
  cocoapods-deintegrate (1.0.5)
51
- cocoapods-downloader (1.6.3)
51
+ cocoapods-downloader (2.1)
52
52
  cocoapods-plugins (1.0.0)
53
53
  nap
54
54
  cocoapods-search (1.0.1)
@@ -57,11 +57,11 @@ GEM
57
57
  netrc (~> 0.11)
58
58
  cocoapods-try (1.2.0)
59
59
  colored2 (3.1.2)
60
- concurrent-ruby (1.1.9)
60
+ concurrent-ruby (1.2.3)
61
61
  escape (0.0.4)
62
- ethon (0.15.0)
62
+ ethon (0.16.0)
63
63
  ffi (>= 1.15.0)
64
- ffi (1.15.4)
64
+ ffi (1.16.3)
65
65
  fourflusher (2.3.1)
66
66
  fuzzy_match (2.0.4)
67
67
  gh_inspector (1.1.3)
@@ -69,10 +69,10 @@ GEM
69
69
  addressable (~> 2.8)
70
70
  rchardet (~> 1.8)
71
71
  httpclient (2.8.3)
72
- i18n (1.8.11)
72
+ i18n (1.14.1)
73
73
  concurrent-ruby (~> 1.0)
74
- json (2.6.1)
75
- minitest (5.14.4)
74
+ json (2.7.1)
75
+ minitest (5.21.2)
76
76
  molinillo (0.8.0)
77
77
  nanaimo (0.3.0)
78
78
  nap (1.1.0)
@@ -80,28 +80,28 @@ GEM
80
80
  public_suffix (4.0.6)
81
81
  rake (13.0.6)
82
82
  rchardet (1.8.0)
83
- rexml (3.2.5)
83
+ rexml (3.2.6)
84
84
  ruby-macho (2.5.1)
85
- typhoeus (1.4.0)
85
+ typhoeus (1.4.1)
86
86
  ethon (>= 0.9.0)
87
- tzinfo (2.0.4)
87
+ tzinfo (2.0.6)
88
88
  concurrent-ruby (~> 1.0)
89
- xcodeproj (1.21.0)
89
+ xcodeproj (1.24.0)
90
90
  CFPropertyList (>= 2.3.3, < 4.0)
91
91
  atomos (~> 0.1.3)
92
92
  claide (>= 1.0.2, < 2.0)
93
93
  colored2 (~> 3.1)
94
94
  nanaimo (~> 0.3.0)
95
95
  rexml (~> 3.2.4)
96
- zeitwerk (2.5.1)
96
+ zeitwerk (2.6.12)
97
97
 
98
98
  PLATFORMS
99
99
  ruby
100
100
 
101
101
  DEPENDENCIES
102
- cocoapods (~> 1.11.0)!
102
+ cocoapods (~> 1.15.0)!
103
103
  git (~> 1.18)!
104
104
  rake (~> 13.0.0)!
105
105
 
106
106
  BUNDLED WITH
107
- 2.2.16
107
+ 2.3.19
@@ -0,0 +1,5 @@
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
+ <array/>
5
+ </plist>
@@ -3,38 +3,4 @@
3
3
  uuid = "01C80884-20C6-43CD-959A-834F11C6CFBC"
4
4
  type = "0"
5
5
  version = "2.0">
6
- <Breakpoints>
7
- <BreakpointProxy
8
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
9
- <BreakpointContent
10
- uuid = "8091EB50-102C-46B2-9DCE-9CC40A3FE4E9"
11
- shouldBeEnabled = "No"
12
- ignoreCount = "0"
13
- continueAfterRunningActions = "No"
14
- filePath = "Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift"
15
- startingColumnNumber = "9223372036854775807"
16
- endingColumnNumber = "9223372036854775807"
17
- startingLineNumber = "112"
18
- endingLineNumber = "112"
19
- landmarkName = "rebuildOutputs(frame:)"
20
- landmarkType = "7">
21
- </BreakpointContent>
22
- </BreakpointProxy>
23
- <BreakpointProxy
24
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
25
- <BreakpointContent
26
- uuid = "CC3C8E8A-14BE-4C8D-8423-0224C306B322"
27
- shouldBeEnabled = "No"
28
- ignoreCount = "0"
29
- continueAfterRunningActions = "No"
30
- filePath = "Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift"
31
- startingColumnNumber = "9223372036854775807"
32
- endingColumnNumber = "9223372036854775807"
33
- startingLineNumber = "245"
34
- endingLineNumber = "245"
35
- landmarkName = "ShapeItemLayer"
36
- landmarkType = "3">
37
- </BreakpointContent>
38
- </BreakpointProxy>
39
- </Breakpoints>
40
6
  </Bucket>
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.4.0")
44
+ .package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.4.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.
package/Rakefile CHANGED
@@ -262,10 +262,5 @@ def ifVisionOSEnabled
262
262
  end
263
263
 
264
264
  def installVisionOSIfNecessary
265
- # visionOS is unsupported by default on Intel, but we can override this
266
- # https://github.com/actions/runner-images/issues/8144#issuecomment-1902072070
267
- sh 'defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES'
268
- sh 'defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES'
269
-
270
265
  xcodebuild("-downloadPlatform visionOS")
271
266
  end
@@ -55,14 +55,14 @@ class DotLottieImageProvider: AnimationImageProvider {
55
55
 
56
56
  private func loadImages() {
57
57
  for url in filepath.urls {
58
- #if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst)
58
+ #if canImport(UIKit)
59
59
  if
60
60
  let data = try? Data(contentsOf: url),
61
61
  let image = UIImage(data: data)?.cgImage
62
62
  {
63
63
  images[url.lastPathComponent] = image
64
64
  }
65
- #elseif os(macOS)
65
+ #elseif canImport(AppKit)
66
66
  if
67
67
  let data = try? Data(contentsOf: url),
68
68
  let image = NSImage(data: data)?.lottie_CGImage
@@ -1,5 +1,5 @@
1
1
  import Foundation
2
- #if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst)
2
+ #if canImport(UIKit)
3
3
  import UIKit
4
4
  #endif
5
5
 
@@ -369,7 +369,7 @@ extension CGPoint {
369
369
  while foundPoint == false {
370
370
  refineIterations = refineIterations + 1
371
371
  /// First see if the next point is still less than the projected length.
372
- let nextPoint = points[closestPoint + 1]
372
+ let nextPoint = points[min(closestPoint + 1, points.indices.last!)]
373
373
  if nextPoint.distance < accurateDistance {
374
374
  point = nextPoint
375
375
  closestPoint = closestPoint + 1
@@ -1041,14 +1041,6 @@ public class LottieAnimationLayer: CALayer {
1041
1041
  }
1042
1042
  }
1043
1043
 
1044
- func updateRasterizationState() {
1045
- if isAnimationPlaying {
1046
- animationLayer?.shouldRasterize = false
1047
- } else {
1048
- animationLayer?.shouldRasterize = shouldRasterizeWhenIdle
1049
- }
1050
- }
1051
-
1052
1044
  /// Updates the animation frame. Does not affect any current animations
1053
1045
  func updateAnimationFrame(_ newFrame: CGFloat) {
1054
1046
  // In performance tests, we have to wrap the animation layer setup
@@ -1098,6 +1090,14 @@ public class LottieAnimationLayer: CALayer {
1098
1090
  addNewAnimationForContext(newContext)
1099
1091
  }
1100
1092
 
1093
+ func updateRasterizationState() {
1094
+ if isAnimationPlaying {
1095
+ animationLayer?.shouldRasterize = false
1096
+ } else {
1097
+ animationLayer?.shouldRasterize = shouldRasterizeWhenIdle
1098
+ }
1099
+ }
1100
+
1101
1101
  func loadAnimation(_ animationSource: LottieAnimationSource?) {
1102
1102
  switch animationSource {
1103
1103
  case .lottieAnimation(let animation):
@@ -855,7 +855,6 @@ open class LottieAnimationView: LottieAnimationViewBase {
855
855
  var shouldForceUpdates = false
856
856
 
857
857
  if let viewportFrame {
858
- setNeedsLayout()
859
858
  shouldForceUpdates = contentMode == .redraw
860
859
 
861
860
  let compAspect = viewportFrame.size.width / viewportFrame.size.height
@@ -995,11 +994,7 @@ open class LottieAnimationView: LottieAnimationViewBase {
995
994
  }
996
995
 
997
996
  func updateRasterizationState() {
998
- if lottieAnimationLayer.isAnimationPlaying {
999
- lottieAnimationLayer.animationLayer?.shouldRasterize = false
1000
- } else {
1001
- lottieAnimationLayer.animationLayer?.shouldRasterize = lottieAnimationLayer.shouldRasterizeWhenIdle
1002
- }
997
+ lottieAnimationLayer.updateRasterizationState()
1003
998
  }
1004
999
 
1005
1000
  /// Updates the animation frame. Does not affect any current animations
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  import Foundation
9
- #if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst)
9
+ #if canImport(UIKit)
10
10
 
11
11
  /// An Objective-C compatible wrapper around Lottie's AnimationKeypath
12
12
  @objc
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  import Foundation
9
- #if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst)
9
+ #if canImport(UIKit)
10
10
  import UIKit
11
11
 
12
12
  /// An Objective-C compatible wrapper around Lottie's Animation class.
@@ -8,7 +8,7 @@
8
8
 
9
9
  Pod::Spec.new do |s|
10
10
  s.name = 'lottie-ios'
11
- s.version = '4.4.0'
11
+ s.version = '4.4.1'
12
12
  s.summary = 'A library to render native animations from bodymovin json'
13
13
 
14
14
  s.description = <<-DESC
@@ -27,10 +27,9 @@ Lottie enables designers to create and ship beautiful animations without an engi
27
27
  s.osx.deployment_target = '10.12'
28
28
  s.tvos.deployment_target = '11.0'
29
29
 
30
- s.source_files = 'Sources/**/*'
31
- s.exclude_files = 'Sources/**/*.md'
30
+ s.source_files = 'Sources/**/*.swift'
32
31
  s.resource_bundles = {
33
- 'Lottie_Privacy' => ['Sources/PrivacyInfo.xcprivacy'],
32
+ 'LottiePrivacyInfo' => ['Sources/PrivacyInfo.xcprivacy'],
34
33
  }
35
34
  s.ios.exclude_files = 'Sources/Public/MacOS/**/*'
36
35
  s.tvos.exclude_files = 'Sources/Public/MacOS/**/*'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lottie-ios",
3
- "version": "4.4.0",
3
+ "version": "4.4.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": {