diff --git a/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift b/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift index f62b7760db..0d9392f8a3 100644 --- a/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift +++ b/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/6/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAAnimation { @@ -79,3 +80,4 @@ extension CALayer { add(animation.timed(with: context, for: self), forKey: animation.keyPath) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift b/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift index 1447419e92..3ece7b88ac 100644 --- a/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/14/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CALayer { @@ -467,3 +468,4 @@ extension RandomAccessCollection { return segments } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift b/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift index e5b888f45e..f6ab93649d 100644 --- a/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/28/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAShapeLayer { @@ -82,3 +83,4 @@ extension CombinedShapeItem { name: name) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift b/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift index 2171eda517..096f26ff3c 100644 --- a/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/21/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAShapeLayer { @@ -84,3 +85,4 @@ struct BezierPathKeyframe: Interpolatable { cornerRadius: cornerRadius.interpolate(to: to.cornerRadius, amount: amount)) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/DropShadowAnimation.swift b/Sources/Private/CoreAnimation/Animations/DropShadowAnimation.swift index 92296390bb..e352c9d719 100644 --- a/Sources/Private/CoreAnimation/Animations/DropShadowAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/DropShadowAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/15/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - DropShadowModel @@ -158,3 +159,4 @@ extension CALayer { } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift b/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift index df3d148d48..15edb38c30 100644 --- a/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/21/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAShapeLayer { @@ -47,3 +48,4 @@ extension Ellipse { makeCombinedResult: Ellipse.Keyframe.init) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift b/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift index 17ebf274d0..5a288c40cb 100644 --- a/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +++ b/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/7/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - GradientShapeItem @@ -242,3 +243,4 @@ extension GradientShapeItem { } } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/LayerProperty.swift b/Sources/Private/CoreAnimation/Animations/LayerProperty.swift index b3fd3ad1bc..bc00b53e2a 100644 --- a/Sources/Private/CoreAnimation/Animations/LayerProperty.swift +++ b/Sources/Private/CoreAnimation/Animations/LayerProperty.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/11/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - LayerProperty @@ -399,3 +400,4 @@ extension CustomizableProperty { }) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift b/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift index b7bf2200eb..c02d64e8c0 100644 --- a/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 5/17/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - OpacityAnimationModel @@ -50,3 +51,4 @@ extension CALayer { context: context) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift b/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift index 8c617a67eb..27b61f68c1 100644 --- a/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/21/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAShapeLayer { @@ -52,3 +53,4 @@ extension Rectangle { makeCombinedResult: Rectangle.Keyframe.init) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift b/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift index 0559f29a2f..f5926de0f0 100644 --- a/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/7/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAShapeLayer { @@ -234,3 +235,4 @@ extension Trim { strokeEnd: combinedKeyframes.map { $0.end }) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/StarAnimation.swift b/Sources/Private/CoreAnimation/Animations/StarAnimation.swift index 62a762111b..fa962054f2 100644 --- a/Sources/Private/CoreAnimation/Animations/StarAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/StarAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/10/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CAShapeLayer { @@ -114,3 +115,4 @@ extension Star { makeCombinedResult: Star.Keyframe.init) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift b/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift index 92b5e4a18b..9b4818d3a9 100644 --- a/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 2/10/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - StrokeShapeItem @@ -84,3 +85,4 @@ extension CAShapeLayer { } } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift b/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift index 806ff135d5..b9d16e304e 100644 --- a/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +++ b/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/17/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - TransformModel @@ -341,3 +342,4 @@ extension TransformModel { scale.keyframes.contains(where: { $0.value.x < 0 }) } } +#endif diff --git a/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift b/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift index 7d6c4b71ea..ac1f1e8387 100644 --- a/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift +++ b/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/21/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CALayer { @@ -61,3 +62,4 @@ extension CALayer { } } } +#endif diff --git a/Sources/Private/CoreAnimation/CompatibilityTracker.swift b/Sources/Private/CoreAnimation/CompatibilityTracker.swift index ce7e09793e..41b6816f68 100644 --- a/Sources/Private/CoreAnimation/CompatibilityTracker.swift +++ b/Sources/Private/CoreAnimation/CompatibilityTracker.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 5/4/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - CompatibilityIssue /// A compatibility issue that was encountered while setting up an animation with the Core Animation engine @@ -128,3 +129,4 @@ extension LayerAnimationContext: CompatibilityTrackerProviding { currentKeypath.fullPath } } +#endif diff --git a/Sources/Private/CoreAnimation/CoreAnimationLayer.swift b/Sources/Private/CoreAnimation/CoreAnimationLayer.swift index 594368dc51..cbfe5c16d2 100644 --- a/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +++ b/Sources/Private/CoreAnimation/CoreAnimationLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - CoreAnimationLayer @@ -597,3 +598,4 @@ extension CALayer { return numberOfSublayersWithTimeRemapping } } +#endif diff --git a/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift b/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift index fe9e9e0268..a15434e5d1 100644 --- a/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift +++ b/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/15/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - CALayer + fillBoundsOfSuperlayer @@ -33,3 +34,4 @@ extension CALayer { protocol CustomLayoutLayer: CALayer { func layout(superlayerBounds: CGRect) } +#endif diff --git a/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift b/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift index 627d742936..04f4d3f055 100644 --- a/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift +++ b/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/11/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - KeyframeGroup + exactlyOneKeyframe extension KeyframeGroup { @@ -27,3 +28,4 @@ extension KeyframeGroup { return keyframes[0].value } } +#endif diff --git a/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift b/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift index 5b70c512a7..f4c26b5fdc 100644 --- a/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift +++ b/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/28/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - Keyframes enum Keyframes { @@ -326,3 +327,4 @@ extension KeyframeGroup { } } } +#endif diff --git a/Sources/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift b/Sources/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift index 217e38ddae..bd03e40486 100644 --- a/Sources/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift +++ b/Sources/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/8/24. // Copyright © 2024 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) extension Keyframes { /// Manually interpolates the given keyframes, and applies `context.complexTimeRemapping`. /// - Since `complexTimeRemapping` is a mapping from "global time" to "local time", @@ -44,3 +45,4 @@ extension Keyframes { return KeyframeGroup(keyframes: ContiguousArray(interpolatedRemappedKeyframes)) } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift b/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift index dfd10b58af..46c68c0c8b 100644 --- a/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/14/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - AnimationLayer @@ -167,3 +168,4 @@ final class LoggingState { /// has been logged yet for this layer. var hasLoggedAfterEffectsExpressionsWarning = false } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift b/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift index 06248b20f8..7fe053e83d 100644 --- a/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/27/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore /// A base `CALayer` that manages the frame and animations @@ -31,3 +32,4 @@ class BaseAnimationLayer: CALayer, AnimationLayer { } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift b/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift index 976580338e..46dbe358e0 100644 --- a/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/20/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - BaseCompositionLayer @@ -108,3 +109,4 @@ class BaseCompositionLayer: BaseAnimationLayer { } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift b/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift index dfbf28cff5..e5d85e4239 100644 --- a/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift +++ b/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/11/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CALayer { @@ -167,3 +168,4 @@ extension Collection { return layersAndMasks } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift b/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift index cb2fe4888e..ef6a154a2a 100644 --- a/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/10/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - GradientRenderLayer @@ -95,3 +96,4 @@ extension CALayer { /// `CGContext.drawLinearGradient` with `[.drawsAfterEndLocation, .drawsBeforeStartLocation]` etc. static let veryLargeLayerPadding: CGFloat = 10_000 } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/ImageLayer.swift b/Sources/Private/CoreAnimation/Layers/ImageLayer.swift index 433c06f3b7..27bf777d9d 100644 --- a/Sources/Private/CoreAnimation/Layers/ImageLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/ImageLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/10/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - ImageLayer @@ -78,3 +79,4 @@ extension ImageLayer: CustomLayoutLayer { height: CGFloat(imageAsset.height)) } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift b/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift index 4549fea691..b65e2448a4 100644 --- a/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 10/10/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - ExpandedAnimationLayer @@ -54,3 +55,4 @@ final class InfiniteOpaqueAnimationLayer: BaseAnimationLayer { private let additionalPaddingLayer = CALayer() } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift b/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift index 0ca9339049..abfb0f1c38 100644 --- a/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/20/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - LayerContext /// Context available when constructing an `AnimationLayer` @@ -57,3 +58,4 @@ extension LayerModel { } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift b/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift index d032ab5dab..2a3a7cb1a5 100644 --- a/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/6/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - MaskCompositionLayer @@ -136,3 +137,4 @@ extension MaskCompositionLayer.MaskLayer: AnimationLayer { }) } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift b/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift index 7006192738..d207d7ebeb 100644 --- a/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/14/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - PreCompLayer @@ -103,3 +104,4 @@ extension PreCompLayer: CustomLayoutLayer { contentsLayer.masksToBounds = true } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift b/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift index e27e7e876b..72defbdbfd 100644 --- a/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/1/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - RepeaterLayer @@ -96,3 +97,4 @@ extension RepeaterTransform: TransformModel { var _skew: KeyframeGroup? { nil } var _skewAxis: KeyframeGroup? { nil } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift b/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift index 2b3412d67f..a4438973b2 100644 --- a/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - ShapeItemLayer @@ -342,3 +343,4 @@ extension LayerAnimationContext { return context } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift b/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift index 6a38808af9..7ef7a35968 100644 --- a/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/14/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - ShapeLayer @@ -559,3 +560,4 @@ extension [ShapeItemLayer.Item] { return (validGroups: renderGroups, unusedItems: itemsNotInValidRenderGroups) } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/SolidLayer.swift b/Sources/Private/CoreAnimation/Layers/SolidLayer.swift index 2e1d5e33e1..74a1848d0b 100644 --- a/Sources/Private/CoreAnimation/Layers/SolidLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/SolidLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - SolidLayer @@ -63,3 +64,4 @@ final class SolidLayer: BaseCompositionLayer { } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/TextLayer.swift b/Sources/Private/CoreAnimation/Layers/TextLayer.swift index 48b7709620..2c80711328 100644 --- a/Sources/Private/CoreAnimation/Layers/TextLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/TextLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 2/9/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore /// The `CALayer` type responsible for rendering `TextLayer`s @@ -113,3 +114,4 @@ final class TextLayer: BaseCompositionLayer { } } +#endif diff --git a/Sources/Private/CoreAnimation/Layers/TransformLayer.swift b/Sources/Private/CoreAnimation/Layers/TransformLayer.swift index 027739a447..d05a421fd4 100644 --- a/Sources/Private/CoreAnimation/Layers/TransformLayer.swift +++ b/Sources/Private/CoreAnimation/Layers/TransformLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/21/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) /// The CALayer type responsible for only rendering the `transform` of a `LayerModel` final class TransformLayer: BaseCompositionLayer { @@ -9,3 +10,4 @@ final class TransformLayer: BaseCompositionLayer { override var renderLayerContents: Bool { false } } +#endif diff --git a/Sources/Private/CoreAnimation/ValueProviderStore.swift b/Sources/Private/CoreAnimation/ValueProviderStore.swift index 76934114bc..af9f16c2ea 100644 --- a/Sources/Private/CoreAnimation/ValueProviderStore.swift +++ b/Sources/Private/CoreAnimation/ValueProviderStore.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/13/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - ValueProviderStore @@ -149,3 +150,4 @@ extension AnimationKeypath { return fullPath.range(of: regex, options: .regularExpression) != nil } } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift index 0b4301f4e0..87da38eaac 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift @@ -1,6 +1,7 @@ // Created by eric_horacek on 12/1/20. // Copyright © 2020 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - MakeViewProviding /// The capability of constructing a `UIView`. @@ -58,3 +59,4 @@ extension ViewEpoxyModeled where Self: MakeViewProviding { updateStrategy: .replace) } } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift index e41ac7906d..00c4faf4b1 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift @@ -1,7 +1,7 @@ // Created by eric_horacek on 12/16/20. // Copyright © 2020 Airbnb Inc. All rights reserved. -#if !os(macOS) +#if !os(macOS) && canImport(QuartzCore) import UIKit /// The capability of providing a `UITraitCollection` instance. diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift index b36eed8cbe..f817d29783 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift @@ -1,6 +1,7 @@ // Created by eric_horacek on 12/16/20. // Copyright © 2020 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) /// The capability of providing an `View` instance /// /// Typically conformed to by the `CallbackContext` of a `CallbackContextEpoxyModeled`. @@ -11,3 +12,4 @@ protocol ViewProviding { /// The `UIView` view instance provided by this type. var view: View { get } } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift index 27901b28fb..44806b7859 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift @@ -1,6 +1,7 @@ // Created by eric_horacek on 12/4/20. // Copyright © 2020 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) /// An Epoxy model with an associated `UIView` type. protocol ViewEpoxyModeled: EpoxyModeled { /// The view type associated with this model. @@ -8,3 +9,4 @@ protocol ViewEpoxyModeled: EpoxyModeled { /// An instance of this view is typically configured by this model. associatedtype View: ViewType } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift index be3b8a91f3..7abd777772 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift @@ -1,7 +1,7 @@ // Created by eric_horacek on 9/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - StyledView diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift index 6111e22fde..eed45aa3cc 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift @@ -1,7 +1,7 @@ // Created by eric_horacek on 6/22/22. // Copyright © 2022 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - MeasuringViewRepresentable diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift index cf39e22e9c..d74c19566a 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift @@ -1,7 +1,7 @@ // Created by Bryn Bodayle on 1/24/22. // Copyright © 2022 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - SwiftUIMeasurementContainer diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift index 885a4e1a9d..f94dd99758 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift @@ -1,7 +1,7 @@ // Created by eric_horacek on 9/8/22. // Copyright © 2022 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - SwiftUIView diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIView+SwiftUIView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIView+SwiftUIView.swift index bbea0a8784..02abf2ff27 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIView+SwiftUIView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIView+SwiftUIView.swift @@ -1,7 +1,7 @@ // Created by eric_horacek on 3/3/22. // Copyright © 2022 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - ViewTypeProtocol + swiftUIView diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIViewConfiguringSwiftUIView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIViewConfiguringSwiftUIView.swift index d7f8deda9b..2967ab1eaf 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIViewConfiguringSwiftUIView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIViewConfiguringSwiftUIView.swift @@ -1,7 +1,7 @@ // Created by eric_horacek on 3/4/22. // Copyright © 2022 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - UIViewConfiguringSwiftUIView diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/BehaviorsConfigurableView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/BehaviorsConfigurableView.swift index 33c63f5684..6e3c13dd67 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/BehaviorsConfigurableView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/BehaviorsConfigurableView.swift @@ -1,6 +1,7 @@ // Created by Tyler Hedrick on 5/26/20. // Copyright © 2020 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - BehaviorsConfigurableView /// A view that can be configured with a `Behaviors` instance that contains the view's non- @@ -43,3 +44,4 @@ extension BehaviorsConfigurableView where Behaviors == Never { } } } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ContentConfigurableView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ContentConfigurableView.swift index 6ebce5ac17..1617103a4b 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ContentConfigurableView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ContentConfigurableView.swift @@ -1,6 +1,7 @@ // Created by Laura Skelton on 5/30/17. // Copyright © 2017 Airbnb. All rights reserved. +#if canImport(QuartzCore) // MARK: - ContentConfigurableView /// A view that can be configured with a `Content` instance that contains the view's `Equatable` @@ -34,3 +35,4 @@ protocol ContentConfigurableView: ViewType { extension ContentConfigurableView where Content == Never { func setContent(_: Never, animated _: Bool) { } } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/EpoxyableView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/EpoxyableView.swift index 5f13195a31..cb4f28c60b 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/EpoxyableView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/EpoxyableView.swift @@ -1,5 +1,7 @@ // Created by eric_horacek on 1/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) /// A `UIView` that can be declaratively configured via a concrete `EpoxyableModel` instance. typealias EpoxyableView = BehaviorsConfigurableView & ContentConfigurableView & StyledView +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/StyledView.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/StyledView.swift index 13f871199b..5bac1c8435 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/StyledView.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/StyledView.swift @@ -1,6 +1,7 @@ // Created by Laura Skelton on 4/14/16. // Copyright © 2016 Airbnb. All rights reserved. +#if canImport(QuartzCore) // MARK: - StyledView /// A view that can be initialized with a `Style` instance that contains the view's invariant @@ -40,3 +41,4 @@ extension StyledView where Style == Never { switch style { } } } +#endif diff --git a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ViewType.swift b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ViewType.swift index 27f80c74e9..0c938a0700 100644 --- a/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ViewType.swift +++ b/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ViewType.swift @@ -1,7 +1,7 @@ // Created by Cal Stephens on 6/26/23. // Copyright © 2023 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI #if canImport(UIKit) import UIKit diff --git a/Sources/Private/EmbeddedLibraries/LRUCache/LRUCache.swift b/Sources/Private/EmbeddedLibraries/LRUCache/LRUCache.swift index 771e0b4caa..0d6dcd8de0 100644 --- a/Sources/Private/EmbeddedLibraries/LRUCache/LRUCache.swift +++ b/Sources/Private/EmbeddedLibraries/LRUCache/LRUCache.swift @@ -33,7 +33,7 @@ import Foundation -#if canImport(UIKit) +#if canImport(UIKit) && canImport(QuartzCore) import UIKit /// Notification that cache should be cleared diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift index ba673900dd..12586afe8a 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/22/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - CompositionLayer @@ -158,3 +159,4 @@ class CompositionLayer: CALayer, KeypathSearchable { protocol CompositionLayerDelegate: AnyObject { func frameUpdated(frame: CGFloat) } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift index 708b8a14be..37e07a505d 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import QuartzCore final class ImageCompositionLayer: CompositionLayer { @@ -52,3 +53,4 @@ final class ImageCompositionLayer: CompositionLayer { } } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift index bfab6ea50c..0c455cd7e9 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import QuartzCore extension MaskMode { @@ -188,3 +189,4 @@ private class MaskNodeProperties: NodePropertyMap { let shape: NodeProperty let expansion: NodeProperty } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift index 3fdf163760..30f49d64f6 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import Foundation final class NullCompositionLayer: CompositionLayer { @@ -26,3 +27,4 @@ final class NullCompositionLayer: CompositionLayer { } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift index f17025e3e7..18d1ba1323 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import QuartzCore final class PreCompositionLayer: CompositionLayer { @@ -131,3 +132,4 @@ final class PreCompositionLayer: CompositionLayer { fileprivate var animationLayers: [CompositionLayer] } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift index a10189f229..613f98b891 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/22/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -56,3 +57,4 @@ final class ShapeCompositionLayer: CompositionLayer { } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift index 7902770b56..9857d3456e 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import QuartzCore final class SolidCompositionLayer: CompositionLayer { @@ -54,3 +55,4 @@ final class SolidCompositionLayer: CompositionLayer { solidShape.fillColor = colorProperty.value.cgColorValue } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift b/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift index ce31ba3bee..e92efe08ae 100644 --- a/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) /// Needed for NSMutableParagraphStyle... #if os(OSX) import AppKit @@ -168,3 +169,4 @@ final class TextCompositionLayer: CompositionLayer { textLayer.contentsScale = renderScale } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift b/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift index 75fdd4f9f7..8a3818693f 100644 --- a/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/24/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - MainThreadAnimationLayer @@ -310,3 +311,4 @@ private class BlankImageProvider: AnimationImageProvider { nil } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift b/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift index 068f3aa795..e9c061f8e8 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift @@ -1,6 +1,7 @@ // Created by Jianjun Wu on 2022/5/12. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - CachedImageProvider @@ -56,3 +57,4 @@ extension AnimationImageProvider { return CachedImageProvider(imageProvider: self) } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift b/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift index f95efbe31e..cd48fded7f 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -97,3 +98,4 @@ extension [LayerModel] { } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift b/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift index cacba1657a..da5794dfd3 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift @@ -8,6 +8,7 @@ import CoreGraphics import CoreText import Foundation +#if canImport(QuartzCore) import QuartzCore /// Needed for NSMutableParagraphStyle... #if os(OSX) @@ -346,3 +347,4 @@ extension CGContext { } } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift b/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift index c96277c1a2..1b9e2cd4eb 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/28/19. // +#if canImport(QuartzCore) import QuartzCore /// A layer that inverses the alpha output of its input layer. @@ -53,3 +54,4 @@ final class InvertedMatteLayer: CALayer, CompositionLayerDelegate { } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift b/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift index e054ce254f..f6db67e1ea 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift @@ -6,6 +6,7 @@ // Copyright © 2020 YurtvilleProds. All rights reserved. // +#if canImport(QuartzCore) /// Connects a LottieFontProvider to a group of text layers final class LayerFontProvider { @@ -37,3 +38,4 @@ final class LayerFontProvider { } } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift b/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift index db531f85c0..f8f77abde4 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) /// Connects a LottieImageProvider to a group of image layers final class LayerImageProvider { @@ -50,3 +51,4 @@ final class LayerImageProvider { } } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift b/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift index 365ab26ab1..cf6a80f5f4 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift @@ -5,6 +5,7 @@ // Created by Alexandr Goncharov on 07/06/2019. // +#if canImport(QuartzCore) /// Connects a LottieTextProvider to a group of text layers final class LayerTextProvider { @@ -36,3 +37,4 @@ final class LayerTextProvider { } } } +#endif diff --git a/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift b/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift index fc5d2dae90..75809a7aea 100644 --- a/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +++ b/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - LayerTransformProperties @@ -148,3 +149,4 @@ class LayerTransformNode: AnimatorNode { } } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift b/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift index 53b9d3a770..c005cc2b98 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/18/19. // +#if canImport(QuartzCore) // MARK: - NodeTree final class NodeTree { @@ -105,3 +106,4 @@ extension [ShapeItem] { return nodeTree } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift index 8702f2c59c..7b0b8e4062 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -53,3 +54,4 @@ class NodeProperty: AnyNodeProperty { fileprivate var typedContainer: ValueContainer } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift index 132d96a894..6422457ef4 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -48,3 +49,4 @@ extension AnyNodeProperty { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift index c91c99aa5b..e5a3b58bed 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import QuartzCore /// Protocol that provides keypath search functionality. Returns all node properties associated with a keypath. @@ -21,3 +22,4 @@ protocol KeypathSearchable { var keypathLayer: CALayer? { get } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift index c3813d7b42..5eecd22d84 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/21/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - NodePropertyMap @@ -41,3 +42,4 @@ extension NodePropertyMap { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift index 53c95b834f..b454479a06 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/22/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -37,3 +38,4 @@ final class GroupInterpolator: ValueProvider where ValueType: Interpo return updated != nil } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift index b4bff3aac3..1270fb8e9f 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore /// Returns a value for every frame. @@ -41,3 +42,4 @@ final class SingleValueProvider: ValueProvider { private var hasUpdate = true } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift index 67be54b5cf..5c9d682713 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - RoundedCornersProperties @@ -83,3 +84,4 @@ final class RoundedCornersNode: AnimatorNode { fileprivate let upstreamPaths: [PathOutputNode] } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift index 13000dc332..a4923868ec 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - TrimPathProperties @@ -278,3 +279,4 @@ final class TrimPathNode: AnimatorNode { fileprivate let upstreamPaths: [PathOutputNode] } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift index 6c54d4919a..cfa997db8d 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore class GroupOutputNode: NodeOutput { @@ -72,3 +73,4 @@ class GroupOutputNode: NodeOutput { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift index f044b7ba4b..345ec8bd6c 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import CoreGraphics class PassThroughOutputNode: NodeOutput { @@ -44,3 +45,4 @@ class PassThroughOutputNode: NodeOutput { return hasUpdate } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift index b5c600c205..c51c8dc92e 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import CoreGraphics /// A node that has an output of a BezierPath @@ -87,3 +88,4 @@ class PathOutputNode: NodeOutput { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift index c858909a9d..76829ca41a 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore extension FillRule { @@ -67,3 +68,4 @@ final class FillRenderer: PassThroughOutputNode, Renderable { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift index d011ad61d3..7398a9b730 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - GradientFillLayer @@ -244,3 +245,4 @@ final class GradientFillRenderer: PassThroughOutputNode, Renderable { private let maskLayer = CAShapeLayer() } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift index 531b2559d2..37aa59be52 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - Renderer @@ -62,3 +63,4 @@ final class GradientStrokeRenderer: PassThroughOutputNode, Renderable { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift index 953548bd54..1044842498 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore /// A rendered for a Path Fill @@ -150,3 +151,4 @@ final class LegacyGradientFillRenderer: PassThroughOutputNode, Renderable { } } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift index 2e400e43e5..f6c2340ecb 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore extension LineJoin { @@ -163,3 +164,4 @@ final class StrokeRenderer: PassThroughOutputNode, Renderable { } } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift index a5c40e6b63..343b77a5d1 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - EllipseNodeProperties @@ -137,3 +138,4 @@ extension BezierPath { return path } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift index 49e502b9c4..912b37d4d3 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - PolygonNodeProperties @@ -168,3 +169,4 @@ extension BezierPath { return path } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift index 4c93f002b5..841a4a2304 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/21/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -223,3 +224,4 @@ extension BezierPath { return bezierPath } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift index 7bc7d9055d..8c6e5836e0 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/16/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -72,3 +73,4 @@ final class ShapeNode: AnimatorNode, PathNode { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift index bf1753108f..a405317c3a 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - StarNodeProperties @@ -220,3 +221,4 @@ extension BezierPath { return path } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift index ddda7a3cc7..fa2e94d944 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/18/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - GroupNodeProperties @@ -163,3 +164,4 @@ final class GroupNode: AnimatorNode { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift index 1b079b084a..a0a3b5d1bf 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/17/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -88,3 +89,4 @@ final class FillNode: AnimatorNode, RenderNode { fillRender.fillRule = fillProperties.type } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift index 97e37ef614..27a390953b 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - GradientFillProperties @@ -103,3 +104,4 @@ final class GradientFillNode: AnimatorNode, RenderNode { fillRender.fillRule = fillProperties.fillRule.caFillRule } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift index 62f0dfe6c7..e2ceb6c712 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/23/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -149,3 +150,4 @@ final class GradientStrokeNode: AnimatorNode, RenderNode { } } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift index ae2aed4818..ec721a05a1 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - StrokeNodeProperties @@ -178,3 +179,4 @@ extension [CGFloat] { !allSatisfy { $0 == 0.01 } } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift index cb4b04068e..9087d4b713 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/19/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - TextAnimatorNodeProperties @@ -285,3 +286,4 @@ class TextAnimatorNode: AnimatorNode { textOutputNode.strokeWidth = textAnimatorProperties.strokeWidth?.value.cgFloatValue ?? 0 } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift index 82bc247b39..17644da21b 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/15/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - NodeOutput @@ -195,3 +196,4 @@ extension AnimatorNode { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift index defae81534..2a6cfe9b41 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/17/19. // +#if canImport(QuartzCore) // MARK: - PathNode protocol PathNode { @@ -18,3 +19,4 @@ extension PathNode where Self: AnimatorNode { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift b/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift index 959d47e00f..8552a748c4 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/17/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - RenderNode @@ -58,3 +59,4 @@ extension Renderable { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift b/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift index fbe177762c..45179e18cf 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import QuartzCore /// The base layer that holds Shapes and Shape Renderers @@ -76,3 +77,4 @@ class ShapeContainerLayer: CALayer { } } +#endif diff --git a/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift b/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift index bd2eac2c5f..90c1290939 100644 --- a/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift +++ b/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/18/19. // +#if canImport(QuartzCore) import QuartzCore /// The layer responsible for rendering shape objects @@ -96,3 +97,4 @@ final class ShapeRenderLayer: ShapeContainerLayer { shapeLayer.contentsScale = renderScale } } +#endif diff --git a/Sources/Private/Model/Assets/AssetLibrary.swift b/Sources/Private/Model/Assets/AssetLibrary.swift index 7d00b0b7e1..36f4053367 100644 --- a/Sources/Private/Model/Assets/AssetLibrary.swift +++ b/Sources/Private/Model/Assets/AssetLibrary.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/9/19. // +#if canImport(QuartzCore) final class AssetLibrary: Codable, AnyInitializable, Sendable { // MARK: Lifecycle @@ -73,3 +74,4 @@ final class AssetLibrary: Codable, AnyInitializable, Sendable { try container.encode(contentsOf: Array(assets.values)) } } +#endif diff --git a/Sources/Private/Model/Assets/PrecompAsset.swift b/Sources/Private/Model/Assets/PrecompAsset.swift index dfd955e376..524c424625 100644 --- a/Sources/Private/Model/Assets/PrecompAsset.swift +++ b/Sources/Private/Model/Assets/PrecompAsset.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/9/19. // +#if canImport(QuartzCore) final class PrecompAsset: Asset { // MARK: Lifecycle @@ -36,3 +37,4 @@ final class PrecompAsset: Asset { try container.encode(layers, forKey: .layers) } } +#endif diff --git a/Sources/Private/Model/DotLottie/DotLottieAnimation.swift b/Sources/Private/Model/DotLottie/DotLottieAnimation.swift index f7c94a667d..e06b4f4b21 100644 --- a/Sources/Private/Model/DotLottie/DotLottieAnimation.swift +++ b/Sources/Private/Model/DotLottie/DotLottieAnimation.swift @@ -5,6 +5,7 @@ // Created by Evandro Harrison Hoffmann on 28/06/2021. // +#if canImport(QuartzCore) import Foundation // MARK: - DotLottieAnimation @@ -55,3 +56,4 @@ enum DotLottieAnimationMode: String, Codable { case normal case bounce } +#endif diff --git a/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift b/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift index e426fc0a24..23699a24fe 100644 --- a/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift +++ b/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift @@ -5,6 +5,7 @@ // Created by Evandro Hoffmann on 20/10/22. // +#if canImport(QuartzCore) #if canImport(UIKit) import UIKit #elseif canImport(AppKit) @@ -87,3 +88,4 @@ extension DotLottieImageProvider: Hashable { } } +#endif diff --git a/Sources/Private/Model/DotLottie/DotLottieManifest.swift b/Sources/Private/Model/DotLottie/DotLottieManifest.swift index d475092852..9fb6f19ef7 100644 --- a/Sources/Private/Model/DotLottie/DotLottieManifest.swift +++ b/Sources/Private/Model/DotLottie/DotLottieManifest.swift @@ -5,6 +5,7 @@ // Created by Evandro Harrison Hoffmann on 27/06/2020. // +#if canImport(QuartzCore) import Foundation /// Manifest model for .lottie File @@ -40,3 +41,4 @@ struct DotLottieManifest: Codable { } } +#endif diff --git a/Sources/Private/Model/Keyframes/KeyframeData.swift b/Sources/Private/Model/Keyframes/KeyframeData.swift index 753d7f0283..d1ac23039c 100644 --- a/Sources/Private/Model/Keyframes/KeyframeData.swift +++ b/Sources/Private/Model/Keyframes/KeyframeData.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/7/19. // +#if canImport(QuartzCore) // MARK: - KeyframeData /// A generic class used to parse and remap keyframe json. @@ -108,3 +109,4 @@ extension KeyframeData: DictionaryInitializable where T: AnyInitializable { spatialOutTangent: spatialOutTangent) } } +#endif diff --git a/Sources/Private/Model/Keyframes/KeyframeGroup.swift b/Sources/Private/Model/Keyframes/KeyframeGroup.swift index 5da4c4c1b0..47501c3a4f 100644 --- a/Sources/Private/Model/Keyframes/KeyframeGroup.swift +++ b/Sources/Private/Model/Keyframes/KeyframeGroup.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/14/19. // +#if canImport(QuartzCore) // MARK: - KeyframeGroup /// Used for coding/decoding a group of Keyframes by type. @@ -254,3 +255,4 @@ extension KeyframeGroup: AnyKeyframeGroup where T: AnyInterpolatable { KeyframeInterpolator(keyframes: keyframes) } } +#endif diff --git a/Sources/Private/Model/LayerEffects/DropShadowEffect.swift b/Sources/Private/Model/LayerEffects/DropShadowEffect.swift index 655c7f1d49..3df3389ac6 100644 --- a/Sources/Private/Model/LayerEffects/DropShadowEffect.swift +++ b/Sources/Private/Model/LayerEffects/DropShadowEffect.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) final class DropShadowEffect: LayerEffect { // MARK: Lifecycle @@ -41,3 +42,4 @@ final class DropShadowEffect: LayerEffect { } } +#endif diff --git a/Sources/Private/Model/LayerEffects/EffectValues/ColorEffectValue.swift b/Sources/Private/Model/LayerEffects/EffectValues/ColorEffectValue.swift index 125c65d2c7..1a6d9e3ea8 100644 --- a/Sources/Private/Model/LayerEffects/EffectValues/ColorEffectValue.swift +++ b/Sources/Private/Model/LayerEffects/EffectValues/ColorEffectValue.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) final class ColorEffectValue: EffectValue { // MARK: Lifecycle @@ -34,3 +35,4 @@ final class ColorEffectValue: EffectValue { case value = "v" } } +#endif diff --git a/Sources/Private/Model/LayerEffects/EffectValues/EffectValue.swift b/Sources/Private/Model/LayerEffects/EffectValues/EffectValue.swift index 4f154f52c9..fb962a318e 100644 --- a/Sources/Private/Model/LayerEffects/EffectValues/EffectValue.swift +++ b/Sources/Private/Model/LayerEffects/EffectValues/EffectValue.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/15/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - EffectValueType /// https://lottiefiles.github.io/lottie-docs/schema/#/$defs/effect-values @@ -95,3 +96,4 @@ extension [EffectValue] { /// All `EffectValue` subclasses are immutable `Sendable` values. // swiftlint:disable:next no_unchecked_sendable extension EffectValue: @unchecked Sendable { } +#endif diff --git a/Sources/Private/Model/LayerEffects/EffectValues/Vector1DEffectValue.swift b/Sources/Private/Model/LayerEffects/EffectValues/Vector1DEffectValue.swift index 59555a495e..da21f6822d 100644 --- a/Sources/Private/Model/LayerEffects/EffectValues/Vector1DEffectValue.swift +++ b/Sources/Private/Model/LayerEffects/EffectValues/Vector1DEffectValue.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) final class Vector1DEffectValue: EffectValue { // MARK: Lifecycle @@ -34,3 +35,4 @@ final class Vector1DEffectValue: EffectValue { case value = "v" } } +#endif diff --git a/Sources/Private/Model/LayerEffects/LayerEffect.swift b/Sources/Private/Model/LayerEffects/LayerEffect.swift index 654acfc2fc..0ee2a83890 100644 --- a/Sources/Private/Model/LayerEffects/LayerEffect.swift +++ b/Sources/Private/Model/LayerEffects/LayerEffect.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - LayerEffectType /// https://lottiefiles.github.io/lottie-docs/schema/#/$defs/effects @@ -100,3 +101,4 @@ extension [LayerEffect] { /// All `LayerEffect` subclasses are immutable `Sendable` values. // swiftlint:disable:next no_unchecked_sendable extension LayerEffect: @unchecked Sendable { } +#endif diff --git a/Sources/Private/Model/LayerStyles/DropShadowStyle.swift b/Sources/Private/Model/LayerStyles/DropShadowStyle.swift index 1f2d14a904..b109c6405c 100644 --- a/Sources/Private/Model/LayerStyles/DropShadowStyle.swift +++ b/Sources/Private/Model/LayerStyles/DropShadowStyle.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) final class DropShadowStyle: LayerStyle { // MARK: Lifecycle @@ -68,3 +69,4 @@ final class DropShadowStyle: LayerStyle { case distance = "d" } } +#endif diff --git a/Sources/Private/Model/LayerStyles/LayerStyle.swift b/Sources/Private/Model/LayerStyles/LayerStyle.swift index 70d28a5d5a..3d25910d3a 100644 --- a/Sources/Private/Model/LayerStyles/LayerStyle.swift +++ b/Sources/Private/Model/LayerStyles/LayerStyle.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - LayerStyleType enum LayerStyleType: Int, Codable, Sendable { @@ -82,3 +83,4 @@ extension [LayerStyle] { /// All `LayerStyle` subclasses are immutable `Sendable` values. // swiftlint:disable:next no_unchecked_sendable extension LayerStyle: @unchecked Sendable { } +#endif diff --git a/Sources/Private/Model/Layers/ImageLayerModel.swift b/Sources/Private/Model/Layers/ImageLayerModel.swift index 781e5c1f01..53456fca88 100644 --- a/Sources/Private/Model/Layers/ImageLayerModel.swift +++ b/Sources/Private/Model/Layers/ImageLayerModel.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// A layer that holds an image. final class ImageLayerModel: LayerModel { @@ -38,3 +39,4 @@ final class ImageLayerModel: LayerModel { case referenceID = "refId" } } +#endif diff --git a/Sources/Private/Model/Layers/LayerModel.swift b/Sources/Private/Model/Layers/LayerModel.swift index e2e3e38888..dd55a838bb 100644 --- a/Sources/Private/Model/Layers/LayerModel.swift +++ b/Sources/Private/Model/Layers/LayerModel.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/7/19. // +#if canImport(QuartzCore) // MARK: - LayerType + ClassFamily /// Used for mapping a heterogeneous list to classes for parsing. @@ -264,3 +265,4 @@ extension [LayerModel] { /// All `LayerModel` subclasses are immutable `Sendable` values. // swiftlint:disable:next no_unchecked_sendable extension LayerModel: @unchecked Sendable { } +#endif diff --git a/Sources/Private/Model/Layers/PreCompLayerModel.swift b/Sources/Private/Model/Layers/PreCompLayerModel.swift index a83214d75d..c5cff0e504 100644 --- a/Sources/Private/Model/Layers/PreCompLayerModel.swift +++ b/Sources/Private/Model/Layers/PreCompLayerModel.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// A layer that holds another animation composition. final class PreCompLayerModel: LayerModel { @@ -63,3 +64,4 @@ final class PreCompLayerModel: LayerModel { case height = "h" } } +#endif diff --git a/Sources/Private/Model/Layers/ShapeLayerModel.swift b/Sources/Private/Model/Layers/ShapeLayerModel.swift index 805da83a95..e2f02f3943 100644 --- a/Sources/Private/Model/Layers/ShapeLayerModel.swift +++ b/Sources/Private/Model/Layers/ShapeLayerModel.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// A layer that holds vector shape objects. final class ShapeLayerModel: LayerModel { @@ -39,3 +40,4 @@ final class ShapeLayerModel: LayerModel { case items = "shapes" } } +#endif diff --git a/Sources/Private/Model/Layers/SolidLayerModel.swift b/Sources/Private/Model/Layers/SolidLayerModel.swift index 17312c90e1..13df4d66f2 100644 --- a/Sources/Private/Model/Layers/SolidLayerModel.swift +++ b/Sources/Private/Model/Layers/SolidLayerModel.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// A layer that holds a solid color. final class SolidLayerModel: LayerModel { @@ -52,3 +53,4 @@ final class SolidLayerModel: LayerModel { case height = "sh" } } +#endif diff --git a/Sources/Private/Model/Layers/TextLayerModel.swift b/Sources/Private/Model/Layers/TextLayerModel.swift index 604a331f51..40a67b39f1 100644 --- a/Sources/Private/Model/Layers/TextLayerModel.swift +++ b/Sources/Private/Model/Layers/TextLayerModel.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// A layer that holds text. final class TextLayerModel: LayerModel { @@ -54,3 +55,4 @@ final class TextLayerModel: LayerModel { case animators = "a" } } +#endif diff --git a/Sources/Private/Model/Objects/DashPattern.swift b/Sources/Private/Model/Objects/DashPattern.swift index 0c2da6858c..375758209d 100644 --- a/Sources/Private/Model/Objects/DashPattern.swift +++ b/Sources/Private/Model/Objects/DashPattern.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/22/19. // +#if canImport(QuartzCore) // MARK: - DashElementType enum DashElementType: String, Codable { @@ -40,3 +41,4 @@ final class DashElement: Codable, DictionaryInitializable { let value: KeyframeGroup } +#endif diff --git a/Sources/Private/Model/Objects/Mask.swift b/Sources/Private/Model/Objects/Mask.swift index a3fa34b990..bb37e4d75f 100644 --- a/Sources/Private/Model/Objects/Mask.swift +++ b/Sources/Private/Model/Objects/Mask.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - MaskMode enum MaskMode: String, Codable { @@ -78,3 +79,4 @@ final class Mask: Codable, DictionaryInitializable { let expansion: KeyframeGroup } +#endif diff --git a/Sources/Private/Model/Objects/Transform.swift b/Sources/Private/Model/Objects/Transform.swift index ced097a9e6..3a7e194775 100644 --- a/Sources/Private/Model/Objects/Transform.swift +++ b/Sources/Private/Model/Objects/Transform.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/7/19. // +#if canImport(QuartzCore) /// The animatable transform for a layer. Controls position, rotation, scale, and opacity. final class Transform: Codable, DictionaryInitializable { @@ -258,3 +259,4 @@ final class Transform: Codable, DictionaryInitializable { /// Here for the CodingKeys.rotation = "r". `r` and `rz` are the same. private let rotation: KeyframeGroup? } +#endif diff --git a/Sources/Private/Model/ShapeItems/Ellipse.swift b/Sources/Private/Model/ShapeItems/Ellipse.swift index 42f4bc10d8..45619d5704 100644 --- a/Sources/Private/Model/ShapeItems/Ellipse.swift +++ b/Sources/Private/Model/ShapeItems/Ellipse.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - PathDirection enum PathDirection: Int, Codable { @@ -70,3 +71,4 @@ final class Ellipse: ShapeItem { case size = "s" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Fill.swift b/Sources/Private/Model/ShapeItems/Fill.swift index f0090ae1ad..72efcbdcc2 100644 --- a/Sources/Private/Model/ShapeItems/Fill.swift +++ b/Sources/Private/Model/ShapeItems/Fill.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - FillRule enum FillRule: Int, Codable { @@ -70,3 +71,4 @@ final class Fill: ShapeItem { case fillRule = "r" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/GradientFill.swift b/Sources/Private/Model/ShapeItems/GradientFill.swift index 5e83880046..528db37b49 100644 --- a/Sources/Private/Model/ShapeItems/GradientFill.swift +++ b/Sources/Private/Model/ShapeItems/GradientFill.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - GradientType enum GradientType: Int, Codable, Sendable { @@ -133,3 +134,4 @@ final class GradientFill: ShapeItem { case colors = "k" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/GradientStroke.swift b/Sources/Private/Model/ShapeItems/GradientStroke.swift index e2ef2bda1e..38de3e4d9e 100644 --- a/Sources/Private/Model/ShapeItems/GradientStroke.swift +++ b/Sources/Private/Model/ShapeItems/GradientStroke.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - LineCap enum LineCap: Int, Codable, Sendable { @@ -234,3 +235,4 @@ final class GradientStroke: ShapeItem { case colors = "k" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Group.swift b/Sources/Private/Model/ShapeItems/Group.swift index 84a48dde4d..a28811b180 100644 --- a/Sources/Private/Model/ShapeItems/Group.swift +++ b/Sources/Private/Model/ShapeItems/Group.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// An item that define a a group of shape items final class Group: ShapeItem { @@ -44,3 +45,4 @@ final class Group: ShapeItem { case items = "it" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Merge.swift b/Sources/Private/Model/ShapeItems/Merge.swift index e14e5934e5..c2a97b20c3 100644 --- a/Sources/Private/Model/ShapeItems/Merge.swift +++ b/Sources/Private/Model/ShapeItems/Merge.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - MergeMode enum MergeMode: Int, Codable, Sendable { @@ -54,3 +55,4 @@ final class Merge: ShapeItem { case mode = "mm" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Rectangle.swift b/Sources/Private/Model/ShapeItems/Rectangle.swift index 339c1d7521..7f8adbae74 100644 --- a/Sources/Private/Model/ShapeItems/Rectangle.swift +++ b/Sources/Private/Model/ShapeItems/Rectangle.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) final class Rectangle: ShapeItem { // MARK: Lifecycle @@ -68,3 +69,4 @@ final class Rectangle: ShapeItem { case cornerRadius = "r" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Repeater.swift b/Sources/Private/Model/ShapeItems/Repeater.swift index 7062bdd53b..46eed934b2 100644 --- a/Sources/Private/Model/ShapeItems/Repeater.swift +++ b/Sources/Private/Model/ShapeItems/Repeater.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) final class Repeater: ShapeItem { // MARK: Lifecycle @@ -170,3 +171,4 @@ final class Repeater: ShapeItem { case scale = "s" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/RoundedCorners.swift b/Sources/Private/Model/ShapeItems/RoundedCorners.swift index 6cc1aa8559..eaa6f9df72 100644 --- a/Sources/Private/Model/ShapeItems/RoundedCorners.swift +++ b/Sources/Private/Model/ShapeItems/RoundedCorners.swift @@ -5,6 +5,7 @@ // Created by Duolingo on 10/31/22. // +#if canImport(QuartzCore) // MARK: - RoundedCorners final class RoundedCorners: ShapeItem { @@ -43,3 +44,4 @@ final class RoundedCorners: ShapeItem { case radius = "r" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Shape.swift b/Sources/Private/Model/ShapeItems/Shape.swift index eb5158bf11..00c1555e9d 100644 --- a/Sources/Private/Model/ShapeItems/Shape.swift +++ b/Sources/Private/Model/ShapeItems/Shape.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) /// An item that defines an custom shape final class Shape: ShapeItem { @@ -52,3 +53,4 @@ final class Shape: ShapeItem { case direction = "d" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/ShapeItem.swift b/Sources/Private/Model/ShapeItems/ShapeItem.swift index f058100600..bacddfe134 100644 --- a/Sources/Private/Model/ShapeItems/ShapeItem.swift +++ b/Sources/Private/Model/ShapeItems/ShapeItem.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - ShapeType enum ShapeType: String, Codable, Sendable { @@ -169,3 +170,4 @@ extension [ShapeItem] { /// All `ShapeItem` subclasses are immutable `Sendable` values. // swiftlint:disable:next no_unchecked_sendable extension ShapeItem: @unchecked Sendable { } +#endif diff --git a/Sources/Private/Model/ShapeItems/ShapeTransform.swift b/Sources/Private/Model/ShapeItems/ShapeTransform.swift index 26c13db45d..09a12fe0ae 100644 --- a/Sources/Private/Model/ShapeItems/ShapeTransform.swift +++ b/Sources/Private/Model/ShapeItems/ShapeTransform.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) final class ShapeTransform: ShapeItem { // MARK: Lifecycle @@ -191,3 +192,4 @@ final class ShapeTransform: ShapeItem { case skewAxis = "sa" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Star.swift b/Sources/Private/Model/ShapeItems/Star.swift index 06bd869d66..e77911e2c2 100644 --- a/Sources/Private/Model/ShapeItems/Star.swift +++ b/Sources/Private/Model/ShapeItems/Star.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - StarType enum StarType: Int, Codable, Sendable { @@ -127,3 +128,4 @@ final class Star: ShapeItem { case starType = "sy" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Stroke.swift b/Sources/Private/Model/ShapeItems/Stroke.swift index c9f5e8b1cc..a8b04e6334 100644 --- a/Sources/Private/Model/ShapeItems/Stroke.swift +++ b/Sources/Private/Model/ShapeItems/Stroke.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) final class Stroke: ShapeItem { // MARK: Lifecycle @@ -132,3 +133,4 @@ final class Stroke: ShapeItem { case dashPattern = "d" } } +#endif diff --git a/Sources/Private/Model/ShapeItems/Trim.swift b/Sources/Private/Model/ShapeItems/Trim.swift index 0843d8858b..7a1a7a4b7e 100644 --- a/Sources/Private/Model/ShapeItems/Trim.swift +++ b/Sources/Private/Model/ShapeItems/Trim.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) // MARK: - TrimType enum TrimType: Int, Codable { @@ -81,3 +82,4 @@ final class Trim: ShapeItem { case trimType = "m" } } +#endif diff --git a/Sources/Private/Model/Text/Glyph.swift b/Sources/Private/Model/Text/Glyph.swift index 7c68c0701e..b20fc80a04 100644 --- a/Sources/Private/Model/Text/Glyph.swift +++ b/Sources/Private/Model/Text/Glyph.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/9/19. // +#if canImport(QuartzCore) /// A model that holds a vector character final class Glyph: Codable, Sendable, DictionaryInitializable { @@ -92,3 +93,4 @@ final class Glyph: Codable, Sendable, DictionaryInitializable { case shapes } } +#endif diff --git a/Sources/Private/Model/Text/TextAnimator.swift b/Sources/Private/Model/Text/TextAnimator.swift index 9e16ffe05a..b4653f5c5b 100644 --- a/Sources/Private/Model/Text/TextAnimator.swift +++ b/Sources/Private/Model/Text/TextAnimator.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/9/19. // +#if canImport(QuartzCore) final class TextAnimator: Codable, DictionaryInitializable { // MARK: Lifecycle @@ -192,3 +193,4 @@ final class TextAnimator: Codable, DictionaryInitializable { case opacity = "o" } } +#endif diff --git a/Sources/Private/Model/Text/TextDocument.swift b/Sources/Private/Model/Text/TextDocument.swift index 674c9488ca..c8d6f473c5 100644 --- a/Sources/Private/Model/Text/TextDocument.swift +++ b/Sources/Private/Model/Text/TextDocument.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/9/19. // +#if canImport(QuartzCore) // MARK: - TextJustification enum TextJustification: Int, Codable { @@ -119,3 +120,4 @@ final class TextDocument: Codable, DictionaryInitializable, AnyInitializable { case textFrameSize = "sz" } } +#endif diff --git a/Sources/Private/RootAnimationLayer.swift b/Sources/Private/RootAnimationLayer.swift index aa1854162c..d3873d313e 100644 --- a/Sources/Private/RootAnimationLayer.swift +++ b/Sources/Private/RootAnimationLayer.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore // MARK: - RootAnimationLayer @@ -51,3 +52,4 @@ enum AnimationKey { /// The primary animation always uses the given key case specific(String) } +#endif diff --git a/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift b/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift index 79b7f5c04f..6bd43c1b2f 100644 --- a/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift +++ b/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/18/19. // +#if canImport(QuartzCore) extension AnimatorNode { func printNodeTree() { @@ -21,3 +22,4 @@ extension AnimatorNode { } } +#endif diff --git a/Sources/Private/Utility/Debugging/LayerDebugging.swift b/Sources/Private/Utility/Debugging/LayerDebugging.swift index 601ec870f7..294889d8c0 100644 --- a/Sources/Private/Utility/Debugging/LayerDebugging.swift +++ b/Sources/Private/Utility/Debugging/LayerDebugging.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/24/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - LayerDebugStyle @@ -220,3 +221,4 @@ extension [LayerModel] { } } +#endif diff --git a/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift b/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift index f79920e3e6..df10558593 100644 --- a/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift +++ b/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import QuartzCore extension KeypathSearchable { @@ -301,3 +302,4 @@ enum KeyType { case wildcard case fuzzyWildcard } +#endif diff --git a/Sources/Private/Utility/Extensions/BlendMode+Filter.swift b/Sources/Private/Utility/Extensions/BlendMode+Filter.swift index 2d7ad22167..bdfe63e4c7 100644 --- a/Sources/Private/Utility/Extensions/BlendMode+Filter.swift +++ b/Sources/Private/Utility/Extensions/BlendMode+Filter.swift @@ -5,6 +5,7 @@ // Created by Denis Koryttsev on 10.05.2022. // +#if canImport(QuartzCore) extension BlendMode { /// The Core Image filter name for this `BlendMode`, that can be applied to a `CALayer`'s `compositingFilter`. /// Supported compositing filters are defined here: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/uid/TP30000136-SW71 @@ -29,3 +30,4 @@ extension BlendMode { } } } +#endif diff --git a/Sources/Private/Utility/Extensions/CGColor+RGB.swift b/Sources/Private/Utility/Extensions/CGColor+RGB.swift index 0b5720909b..45cdaf3ed4 100644 --- a/Sources/Private/Utility/Extensions/CGColor+RGB.swift +++ b/Sources/Private/Utility/Extensions/CGColor+RGB.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/7/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore extension CGColor { @@ -23,3 +24,4 @@ extension CGColor { components: [red, green, blue, alpha])! } } +#endif diff --git a/Sources/Private/Utility/Extensions/CGFloatExtensions.swift b/Sources/Private/Utility/Extensions/CGFloatExtensions.swift index 28f0e29bf3..1b834b2411 100644 --- a/Sources/Private/Utility/Extensions/CGFloatExtensions.swift +++ b/Sources/Private/Utility/Extensions/CGFloatExtensions.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore extension CGFloat { @@ -150,3 +151,4 @@ extension CGFloat { return -1 } } +#endif diff --git a/Sources/Private/Utility/Extensions/MathKit.swift b/Sources/Private/Utility/Extensions/MathKit.swift index 1be2ffbd0f..16c55d622f 100644 --- a/Sources/Private/Utility/Extensions/MathKit.swift +++ b/Sources/Private/Utility/Extensions/MathKit.swift @@ -6,6 +6,7 @@ // // From https://github.com/buba447/UIToolBox +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -448,3 +449,4 @@ extension CGPoint { y: y + point.y) } } +#endif diff --git a/Sources/Private/Utility/Extensions/StringExtensions.swift b/Sources/Private/Utility/Extensions/StringExtensions.swift index 8d33cee249..52977918c4 100644 --- a/Sources/Private/Utility/Extensions/StringExtensions.swift +++ b/Sources/Private/Utility/Extensions/StringExtensions.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -41,3 +42,4 @@ extension String { } } +#endif diff --git a/Sources/Private/Utility/Helpers/AnimationContext.swift b/Sources/Private/Utility/Helpers/AnimationContext.swift index 8d6cba046c..e1b27b2e59 100644 --- a/Sources/Private/Utility/Helpers/AnimationContext.swift +++ b/Sources/Private/Utility/Helpers/AnimationContext.swift @@ -6,6 +6,7 @@ // import Foundation +#if canImport(QuartzCore) import QuartzCore /// A completion block for animations. @@ -90,3 +91,4 @@ class AnimationCompletionDelegate: NSObject, CAAnimationDelegate { let completionBlock: LottieCompletionBlock? } +#endif diff --git a/Sources/Private/Utility/Helpers/View+ValueChanged.swift b/Sources/Private/Utility/Helpers/View+ValueChanged.swift index 104029fafa..cb5f1bae6f 100644 --- a/Sources/Private/Utility/Helpers/View+ValueChanged.swift +++ b/Sources/Private/Utility/Helpers/View+ValueChanged.swift @@ -1,7 +1,7 @@ // Created by miguel_jimenez on 7/26/23. // Copyright © 2023 Airbnb Inc. All rights reserved. -#if canImport(Combine) && canImport(SwiftUI) +#if canImport(Combine) && canImport(SwiftUI) && canImport(QuartzCore) import Combine import SwiftUI diff --git a/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift b/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift index 7c7fc8b13c..ba670463f8 100644 --- a/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift +++ b/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/14/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -138,3 +139,4 @@ extension TextDocument: Interpolatable { return self } } +#endif diff --git a/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift b/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift index e6e0c1811f..d6fa2516a3 100644 --- a/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift +++ b/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/14/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -44,3 +45,4 @@ extension Keyframe { return progress } } +#endif diff --git a/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift b/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift index 93ba7378ed..b603b8fdb3 100644 --- a/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift +++ b/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/15/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -248,3 +249,4 @@ extension ContiguousArray { } } +#endif diff --git a/Sources/Private/Utility/LottieAnimationSource.swift b/Sources/Private/Utility/LottieAnimationSource.swift index 1e96491512..ce91cce8ae 100644 --- a/Sources/Private/Utility/LottieAnimationSource.swift +++ b/Sources/Private/Utility/LottieAnimationSource.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 7/26/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) // MARK: - LottieAnimationSource /// A data source for a Lottie animation. @@ -49,3 +50,4 @@ extension DotLottieFile { .dotLottieFile(self) } } +#endif diff --git a/Sources/Private/Utility/Primitives/BezierPath.swift b/Sources/Private/Utility/Primitives/BezierPath.swift index 54a509cf8d..019afd6d4b 100644 --- a/Sources/Private/Utility/Primitives/BezierPath.swift +++ b/Sources/Private/Utility/Primitives/BezierPath.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/8/19. // +#if canImport(QuartzCore) import CoreGraphics // MARK: - BezierPath @@ -484,3 +485,4 @@ extension BezierPath { } } +#endif diff --git a/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift b/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift index 7a0c1186df..31977c636f 100644 --- a/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift +++ b/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift @@ -5,6 +5,7 @@ // Created by Duolingo on 11/1/22. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -156,3 +157,4 @@ extension BezierPath { return newPath } } +#endif diff --git a/Sources/Private/Utility/Primitives/ColorExtension.swift b/Sources/Private/Utility/Primitives/ColorExtension.swift index 4fe60b1a06..791ab472d4 100644 --- a/Sources/Private/Utility/Primitives/ColorExtension.swift +++ b/Sources/Private/Utility/Primitives/ColorExtension.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/14/19. // +#if canImport(QuartzCore) import CoreGraphics // MARK: - LottieColor + Codable @@ -99,3 +100,4 @@ extension LottieColor { .rgba(CGFloat(r), CGFloat(g), CGFloat(b), CGFloat(a)) } } +#endif diff --git a/Sources/Private/Utility/Primitives/CompoundBezierPath.swift b/Sources/Private/Utility/Primitives/CompoundBezierPath.swift index b0aa268aa4..2717f037a2 100644 --- a/Sources/Private/Utility/Primitives/CompoundBezierPath.swift +++ b/Sources/Private/Utility/Primitives/CompoundBezierPath.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/14/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -165,3 +166,4 @@ struct CompoundBezierPath { } } +#endif diff --git a/Sources/Private/Utility/Primitives/CurveVertex.swift b/Sources/Private/Utility/Primitives/CurveVertex.swift index 32afadb0a0..20f4cdc582 100644 --- a/Sources/Private/Utility/Primitives/CurveVertex.swift +++ b/Sources/Private/Utility/Primitives/CurveVertex.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/11/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -182,3 +183,4 @@ struct CurveVertex { return distance } } +#endif diff --git a/Sources/Private/Utility/Primitives/PathElement.swift b/Sources/Private/Utility/Primitives/PathElement.swift index 68f43b5f25..c97d2695cd 100644 --- a/Sources/Private/Utility/Primitives/PathElement.swift +++ b/Sources/Private/Utility/Primitives/PathElement.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/11/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -73,3 +74,4 @@ struct PathElement { } } +#endif diff --git a/Sources/Private/Utility/Primitives/VectorsExtensions.swift b/Sources/Private/Utility/Primitives/VectorsExtensions.swift index 626fd33ec4..4127135d09 100644 --- a/Sources/Private/Utility/Primitives/VectorsExtensions.swift +++ b/Sources/Private/Utility/Primitives/VectorsExtensions.swift @@ -7,6 +7,7 @@ import CoreGraphics import Foundation +#if canImport(QuartzCore) import QuartzCore // MARK: - LottieVector1D + Codable @@ -361,3 +362,4 @@ extension CATransform3D { } } +#endif diff --git a/Sources/Public/Animation/LottieAnimation.swift b/Sources/Public/Animation/LottieAnimation.swift index 0893eeeeab..5c9c179dbf 100644 --- a/Sources/Public/Animation/LottieAnimation.swift +++ b/Sources/Public/Animation/LottieAnimation.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/7/19. // +#if canImport(QuartzCore) import Foundation // MARK: - CoordinateSpace @@ -177,3 +178,4 @@ public final class LottieAnimation: Codable, Sendable, DictionaryInitializable { }) } } +#endif diff --git a/Sources/Public/Animation/LottieAnimationHelpers.swift b/Sources/Public/Animation/LottieAnimationHelpers.swift index 337dc9a863..0d139fd6c4 100644 --- a/Sources/Public/Animation/LottieAnimationHelpers.swift +++ b/Sources/Public/Animation/LottieAnimationHelpers.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/5/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -318,3 +319,4 @@ extension LottieAnimation { /// // swiftlint:disable:next no_unchecked_sendable extension Foundation.Bundle: @unchecked Sendable { } +#endif diff --git a/Sources/Public/Animation/LottieAnimationLayer.swift b/Sources/Public/Animation/LottieAnimationLayer.swift index e686665995..2c033fbee5 100644 --- a/Sources/Public/Animation/LottieAnimationLayer.swift +++ b/Sources/Public/Animation/LottieAnimationLayer.swift @@ -3,6 +3,7 @@ // Lottie // +#if canImport(QuartzCore) import QuartzCore // MARK: - LottieAnimationLayer @@ -1520,3 +1521,4 @@ extension LottieLoopMode { } } } +#endif diff --git a/Sources/Public/Animation/LottieAnimationView.swift b/Sources/Public/Animation/LottieAnimationView.swift index 0ddec0ba3c..a2f085a351 100644 --- a/Sources/Public/Animation/LottieAnimationView.swift +++ b/Sources/Public/Animation/LottieAnimationView.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/23/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - LottieBackgroundBehavior @@ -1052,3 +1053,4 @@ open class LottieAnimationView: LottieAnimationViewBase { private let logger: LottieLogger } +#endif diff --git a/Sources/Public/Animation/LottieAnimationViewInitializers.swift b/Sources/Public/Animation/LottieAnimationViewInitializers.swift index 919cc934f2..36114fc9cf 100644 --- a/Sources/Public/Animation/LottieAnimationViewInitializers.swift +++ b/Sources/Public/Animation/LottieAnimationViewInitializers.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/6/19. // +#if canImport(QuartzCore) import Foundation extension LottieAnimationView { @@ -224,3 +225,4 @@ extension LottieAnimationView { enum LottieDownloadError: Error { case downloadFailed } +#endif diff --git a/Sources/Public/Animation/LottiePlaybackMode.swift b/Sources/Public/Animation/LottiePlaybackMode.swift index e33372405b..dfa8a3d01d 100644 --- a/Sources/Public/Animation/LottiePlaybackMode.swift +++ b/Sources/Public/Animation/LottiePlaybackMode.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/3/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import Foundation // MARK: - LottiePlaybackMode @@ -258,3 +259,4 @@ extension LottiePlaybackMode.PlaybackMode { } } } +#endif diff --git a/Sources/Public/Animation/LottieView.swift b/Sources/Public/Animation/LottieView.swift index f7a8ef1e53..1ba99163e3 100644 --- a/Sources/Public/Animation/LottieView.swift +++ b/Sources/Public/Animation/LottieView.swift @@ -1,7 +1,7 @@ // Created by Bryn Bodayle on 1/20/22. // Copyright © 2022 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI // MARK: - LottieView diff --git a/Sources/Public/AnimationCache/AnimationCacheProvider.swift b/Sources/Public/AnimationCache/AnimationCacheProvider.swift index ba6e3768d0..3dbddc5c95 100644 --- a/Sources/Public/AnimationCache/AnimationCacheProvider.swift +++ b/Sources/Public/AnimationCache/AnimationCacheProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/5/19. // +#if canImport(QuartzCore) /// `AnimationCacheProvider` is a protocol that describes an Animation Cache. /// Animation Cache is used when loading `LottieAnimation` models. Using an Animation Cache /// can increase performance when loading an animation multiple times. @@ -19,3 +20,4 @@ public protocol AnimationCacheProvider: AnyObject, Sendable { func clearCache() } +#endif diff --git a/Sources/Public/AnimationCache/DefaultAnimationCache.swift b/Sources/Public/AnimationCache/DefaultAnimationCache.swift index 57f2a9b4c8..3f8c0f24f6 100644 --- a/Sources/Public/AnimationCache/DefaultAnimationCache.swift +++ b/Sources/Public/AnimationCache/DefaultAnimationCache.swift @@ -5,6 +5,7 @@ // Created by Marcelo Fabri on 10/18/22. // +#if canImport(QuartzCore) import Foundation // MARK: - DefaultAnimationCache @@ -65,3 +66,4 @@ public class DefaultAnimationCache: AnimationCacheProvider { // making breaking changes. // swiftlint:disable:next no_unchecked_sendable extension DefaultAnimationCache: @unchecked Sendable { } +#endif diff --git a/Sources/Public/AnimationCache/LRUAnimationCache.swift b/Sources/Public/AnimationCache/LRUAnimationCache.swift index ebf1f5ee56..aafc63b417 100644 --- a/Sources/Public/AnimationCache/LRUAnimationCache.swift +++ b/Sources/Public/AnimationCache/LRUAnimationCache.swift @@ -5,7 +5,9 @@ // Created by Brandon Withrow on 2/5/19. // +#if canImport(QuartzCore) @available(*, deprecated, message: """ Use DefaultAnimationCache instead, which is thread-safe and automatically responds to memory pressure. """) public typealias LRUAnimationCache = DefaultAnimationCache +#endif diff --git a/Sources/Public/AnimationCache/LottieAnimationCache.swift b/Sources/Public/AnimationCache/LottieAnimationCache.swift index efb6a3ee39..e5853d8da4 100644 --- a/Sources/Public/AnimationCache/LottieAnimationCache.swift +++ b/Sources/Public/AnimationCache/LottieAnimationCache.swift @@ -5,6 +5,7 @@ // Created by Marcelo Fabri on 10/17/22. // +#if canImport(QuartzCore) /// A customization point to configure which `AnimationCacheProvider` will be used. public enum LottieAnimationCache { @@ -13,3 +14,4 @@ public enum LottieAnimationCache { /// Defaults to DefaultAnimationCache.sharedCache. public static var shared: AnimationCacheProvider? = DefaultAnimationCache.sharedCache } +#endif diff --git a/Sources/Public/Configuration/LottieConfiguration.swift b/Sources/Public/Configuration/LottieConfiguration.swift index 646ace717a..e6e4391e10 100644 --- a/Sources/Public/Configuration/LottieConfiguration.swift +++ b/Sources/Public/Configuration/LottieConfiguration.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 12/13/21. // Copyright © 2021 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import QuartzCore /// Global configuration options for Lottie animations @@ -45,3 +46,4 @@ public struct LottieConfiguration: Hashable { /// - Defaults to `CGColorSpaceCreateDeviceRGB()` public var colorSpace: CGColorSpace } +#endif diff --git a/Sources/Public/Configuration/ReducedMotionOption.swift b/Sources/Public/Configuration/ReducedMotionOption.swift index 040d9d3548..e551d6e092 100644 --- a/Sources/Public/Configuration/ReducedMotionOption.swift +++ b/Sources/Public/Configuration/ReducedMotionOption.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 7/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) #if canImport(UIKit) import UIKit #elseif canImport(AppKit) @@ -112,3 +113,4 @@ public struct SystemReducedMotionOptionProvider: ReducedMotionOptionProvider { #endif } } +#endif diff --git a/Sources/Public/Controls/AnimatedButton.swift b/Sources/Public/Controls/AnimatedButton.swift index 1e91c67acd..776ccad05a 100644 --- a/Sources/Public/Controls/AnimatedButton.swift +++ b/Sources/Public/Controls/AnimatedButton.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) #if canImport(UIKit) import UIKit #elseif canImport(AppKit) @@ -125,3 +126,4 @@ open class AnimatedButton: AnimatedControl { from: 0, to: 1)] } +#endif diff --git a/Sources/Public/Controls/AnimatedControl.swift b/Sources/Public/Controls/AnimatedControl.swift index ae2cdd563f..7bba7f4297 100644 --- a/Sources/Public/Controls/AnimatedControl.swift +++ b/Sources/Public/Controls/AnimatedControl.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) #if canImport(UIKit) import UIKit #elseif canImport(AppKit) @@ -243,3 +244,4 @@ open class AnimatedControl: LottieControlType { animationView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true } } +#endif diff --git a/Sources/Public/Controls/AnimatedSwitch.swift b/Sources/Public/Controls/AnimatedSwitch.swift index e116e06e31..e76cf32354 100644 --- a/Sources/Public/Controls/AnimatedSwitch.swift +++ b/Sources/Public/Controls/AnimatedSwitch.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) #if canImport(UIKit) import UIKit #elseif canImport(AppKit) @@ -269,3 +270,4 @@ class NullHapticGenerator: ImpactGenerator { func generateImpact() { } } #endif +#endif diff --git a/Sources/Public/Controls/LottieButton.swift b/Sources/Public/Controls/LottieButton.swift index 396a101275..bb7f3fd6b7 100644 --- a/Sources/Public/Controls/LottieButton.swift +++ b/Sources/Public/Controls/LottieButton.swift @@ -1,7 +1,7 @@ // Created by Cal Stephens on 8/14/23. // Copyright © 2023 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI /// A wrapper which exposes Lottie's `AnimatedButton` to SwiftUI diff --git a/Sources/Public/Controls/LottieSwitch.swift b/Sources/Public/Controls/LottieSwitch.swift index fb65783296..a5c46141c0 100644 --- a/Sources/Public/Controls/LottieSwitch.swift +++ b/Sources/Public/Controls/LottieSwitch.swift @@ -1,7 +1,7 @@ // Created by Cal Stephens on 8/11/23. // Copyright © 2023 Airbnb Inc. All rights reserved. -#if canImport(SwiftUI) +#if canImport(SwiftUI) && canImport(QuartzCore) import SwiftUI /// A wrapper which exposes Lottie's `AnimatedSwitch` to SwiftUI diff --git a/Sources/Public/Controls/LottieViewType.swift b/Sources/Public/Controls/LottieViewType.swift index ec97c97df0..08fc2094d2 100644 --- a/Sources/Public/Controls/LottieViewType.swift +++ b/Sources/Public/Controls/LottieViewType.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 8/11/23. // Copyright © 2023 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) #if canImport(UIKit) import UIKit @@ -77,3 +78,4 @@ public struct LottieNSControlEvent: Equatable, Sendable { } } #endif +#endif diff --git a/Sources/Public/DotLottie/Cache/DotLottieCache.swift b/Sources/Public/DotLottie/Cache/DotLottieCache.swift index 1e7d00b11b..f0ce700af1 100644 --- a/Sources/Public/DotLottie/Cache/DotLottieCache.swift +++ b/Sources/Public/DotLottie/Cache/DotLottieCache.swift @@ -5,6 +5,7 @@ // Created by Evandro Hoffmann on 20/10/22. // +#if canImport(QuartzCore) import Foundation // MARK: - DotLottieCache @@ -64,3 +65,4 @@ public class DotLottieCache: DotLottieCacheProvider { // redesign DotLottieCache to be properly Sendable without making breaking changes. // swiftlint:disable:next no_unchecked_sendable extension DotLottieCache: @unchecked Sendable { } +#endif diff --git a/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift b/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift index 6a59cba287..f5337beec1 100644 --- a/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift +++ b/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift @@ -5,6 +5,7 @@ // Created by Evandro Hoffmann on 20/10/22. // +#if canImport(QuartzCore) /// `DotLottieCacheProvider` is a protocol that describes a DotLottie Cache. /// DotLottie Cache is used when loading `DotLottie` models. Using a DotLottie Cache /// can increase performance when loading an animation multiple times. @@ -19,3 +20,4 @@ public protocol DotLottieCacheProvider: Sendable { func clearCache() } +#endif diff --git a/Sources/Public/DotLottie/DotLottieConfiguration.swift b/Sources/Public/DotLottie/DotLottieConfiguration.swift index 2de4b746c9..e42f9b206f 100644 --- a/Sources/Public/DotLottie/DotLottieConfiguration.swift +++ b/Sources/Public/DotLottie/DotLottieConfiguration.swift @@ -5,6 +5,7 @@ // Created by Evandro Hoffmann on 19/10/22. // +#if canImport(QuartzCore) // MARK: - DotLottieConfiguration /// The `DotLottieConfiguration` model holds the presets extracted from DotLottieAnimation @@ -70,3 +71,4 @@ public struct DotLottieConfigurationComponents: OptionSet { public let rawValue: Int } +#endif diff --git a/Sources/Public/DotLottie/DotLottieFile.swift b/Sources/Public/DotLottie/DotLottieFile.swift index 4e329b2d74..db794d3783 100644 --- a/Sources/Public/DotLottie/DotLottieFile.swift +++ b/Sources/Public/DotLottie/DotLottieFile.swift @@ -5,6 +5,7 @@ // Created by Evandro Harrison Hoffmann on 27/06/2020. // +#if canImport(QuartzCore) import Foundation // MARK: - DotLottieFile @@ -152,3 +153,4 @@ extension String { // to make it truly thread-safe. // swiftlint:disable:next no_unchecked_sendable extension DotLottieFile: @unchecked Sendable { } +#endif diff --git a/Sources/Public/DotLottie/DotLottieFileHelpers.swift b/Sources/Public/DotLottie/DotLottieFileHelpers.swift index 018bd59708..d1ed7a552c 100644 --- a/Sources/Public/DotLottie/DotLottieFileHelpers.swift +++ b/Sources/Public/DotLottie/DotLottieFileHelpers.swift @@ -5,6 +5,7 @@ // Created by Evandro Hoffmann on 20/10/22. // +#if canImport(QuartzCore) import Foundation extension DotLottieFile { @@ -371,3 +372,4 @@ extension DispatchQueue { label: "com.airbnb.lottie.dot-lottie", qos: .userInitiated) } +#endif diff --git a/Sources/Public/DynamicProperties/AnyValueProvider.swift b/Sources/Public/DynamicProperties/AnyValueProvider.swift index 9970b48d1d..13c14793b1 100644 --- a/Sources/Public/DynamicProperties/AnyValueProvider.swift +++ b/Sources/Public/DynamicProperties/AnyValueProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/30/19. // +#if canImport(QuartzCore) import Foundation // MARK: - AnyValueProvider @@ -129,3 +130,4 @@ public enum AnyValueProviderStorage { } } } +#endif diff --git a/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift b/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift index a8680986c9..9099e9a2da 100644 --- a/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift +++ b/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -96,3 +97,4 @@ extension ColorValueProvider: Equatable { lhs.identity == rhs.identity } } +#endif diff --git a/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift b/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift index fb22c2b9ef..edaed44dbf 100644 --- a/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift +++ b/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -81,3 +82,4 @@ extension FloatValueProvider: Equatable { lhs.identity == rhs.identity } } +#endif diff --git a/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift b/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift index aa44782670..f3561c744c 100644 --- a/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +++ b/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift @@ -5,6 +5,7 @@ // Created by Enrique Bermúdez on 10/27/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -138,3 +139,4 @@ extension GradientValueProvider: Equatable { lhs.identity == rhs.identity } } +#endif diff --git a/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift b/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift index 8b9703bfe8..fc09553520 100644 --- a/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift +++ b/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -81,3 +82,4 @@ extension PointValueProvider: Equatable { lhs.identity == rhs.identity } } +#endif diff --git a/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift b/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift index aa5cac9498..c1c7feb9be 100644 --- a/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift +++ b/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // +#if canImport(QuartzCore) import CoreGraphics import Foundation @@ -81,3 +82,4 @@ extension SizeValueProvider: Equatable { lhs.identity == rhs.identity } } +#endif diff --git a/Sources/Public/ImageProvider/AnimationImageProvider.swift b/Sources/Public/ImageProvider/AnimationImageProvider.swift index 7f7477003e..21e6e2a646 100644 --- a/Sources/Public/ImageProvider/AnimationImageProvider.swift +++ b/Sources/Public/ImageProvider/AnimationImageProvider.swift @@ -5,6 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // +#if canImport(QuartzCore) import QuartzCore // MARK: - AnimationImageProvider @@ -41,3 +42,4 @@ extension AnimationImageProvider { .resize } } +#endif diff --git a/Sources/Public/Keyframes/Interpolatable.swift b/Sources/Public/Keyframes/Interpolatable.swift index a0f09b60be..2ffd97037b 100644 --- a/Sources/Public/Keyframes/Interpolatable.swift +++ b/Sources/Public/Keyframes/Interpolatable.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/24/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import CoreGraphics // MARK: - Interpolatable @@ -277,3 +278,4 @@ struct Hold: Interpolatable { } } } +#endif diff --git a/Sources/Public/Keyframes/Keyframe.swift b/Sources/Public/Keyframes/Keyframe.swift index 626260cd5d..47a2d3403c 100644 --- a/Sources/Public/Keyframes/Keyframe.swift +++ b/Sources/Public/Keyframes/Keyframe.swift @@ -1,6 +1,7 @@ // Created by Cal Stephens on 1/24/22. // Copyright © 2022 Airbnb Inc. All rights reserved. +#if canImport(QuartzCore) import CoreFoundation // MARK: - Keyframe @@ -96,3 +97,4 @@ extension Keyframe: Hashable where T: Hashable { // MARK: Sendable extension Keyframe: Sendable where T: Sendable { } +#endif diff --git a/Sources/Public/TextProvider/AnimationTextProvider.swift b/Sources/Public/TextProvider/AnimationTextProvider.swift index 52ce0941ec..b0aa87d026 100644 --- a/Sources/Public/TextProvider/AnimationTextProvider.swift +++ b/Sources/Public/TextProvider/AnimationTextProvider.swift @@ -5,6 +5,7 @@ // Created by Alexandr Goncharov on 07/06/2019. // +#if canImport(QuartzCore) // MARK: - AnimationKeypathTextProvider /// Protocol for providing dynamic text to for a Lottie animation. @@ -122,3 +123,4 @@ extension DefaultTextProvider: Equatable { true } } +#endif diff --git a/Sources/Public/iOS/AnimationSubview.swift b/Sources/Public/iOS/AnimationSubview.swift index 93264ef259..96f12cadd6 100644 --- a/Sources/Public/iOS/AnimationSubview.swift +++ b/Sources/Public/iOS/AnimationSubview.swift @@ -5,7 +5,7 @@ // Created by Brandon Withrow on 2/4/19. // -#if canImport(UIKit) +#if canImport(UIKit) && canImport(QuartzCore) import UIKit /// A view that can be added to a keypath of an AnimationView diff --git a/Sources/Public/iOS/BundleImageProvider.swift b/Sources/Public/iOS/BundleImageProvider.swift index 3317e0b196..8b38ef94ec 100644 --- a/Sources/Public/iOS/BundleImageProvider.swift +++ b/Sources/Public/iOS/BundleImageProvider.swift @@ -5,7 +5,7 @@ // Created by Brandon Withrow on 1/25/19. // -#if canImport(UIKit) +#if canImport(UIKit) && canImport(QuartzCore) import UIKit /// An `AnimationImageProvider` that provides images by name from a specific bundle. diff --git a/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift b/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift index c78846ffe5..fba92cd827 100644 --- a/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +++ b/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift @@ -6,7 +6,7 @@ // import Foundation -#if canImport(UIKit) +#if canImport(UIKit) && canImport(QuartzCore) import UIKit /// An Objective-C compatible wrapper around Lottie's Animation class. diff --git a/Sources/Public/iOS/FilepathImageProvider.swift b/Sources/Public/iOS/FilepathImageProvider.swift index 32ec3c3b16..cf9e50a815 100644 --- a/Sources/Public/iOS/FilepathImageProvider.swift +++ b/Sources/Public/iOS/FilepathImageProvider.swift @@ -6,7 +6,7 @@ // import Foundation -#if canImport(UIKit) +#if canImport(UIKit) && canImport(QuartzCore) import UIKit /// Provides an image for a lottie animation from a provided Bundle. diff --git a/Sources/Public/iOS/LottieAnimationViewBase.swift b/Sources/Public/iOS/LottieAnimationViewBase.swift index ae761a3953..fa11942885 100644 --- a/Sources/Public/iOS/LottieAnimationViewBase.swift +++ b/Sources/Public/iOS/LottieAnimationViewBase.swift @@ -5,7 +5,7 @@ // Created by Brandon Withrow on 2/6/19. // -#if canImport(UIKit) +#if canImport(UIKit) && canImport(QuartzCore) import UIKit /// The base view for `LottieAnimationView` on iOS, tvOS, watchOS, and macCatalyst. diff --git a/Tests/Utils/HardcodedFontProvider.swift b/Tests/Utils/HardcodedFontProvider.swift index f38092fda2..287b70cfcb 100644 --- a/Tests/Utils/HardcodedFontProvider.swift +++ b/Tests/Utils/HardcodedFontProvider.swift @@ -2,6 +2,7 @@ // Copyright © 2022 Airbnb Inc. All rights reserved. import Lottie +#if canImport(QuartzCore) import QuartzCore #if os(iOS) import UIKit @@ -17,3 +18,4 @@ struct HardcodedFontProvider: AnimationFontProvider { font } } +#endif diff --git a/Tests/Utils/HardcodedImageProvider.swift b/Tests/Utils/HardcodedImageProvider.swift index b1c301ae5f..9e30b7deda 100644 --- a/Tests/Utils/HardcodedImageProvider.swift +++ b/Tests/Utils/HardcodedImageProvider.swift @@ -2,6 +2,7 @@ // Copyright © 2022 Airbnb Inc. All rights reserved. import Lottie +#if canImport(QuartzCore) import QuartzCore #if os(iOS) import UIKit @@ -25,3 +26,4 @@ struct HardcodedImageProvider: AnimationImageProvider { .resizeAspectFill } } +#endif