Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for watchOS preview build issue #2412

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -79,3 +80,4 @@ extension CALayer {
add(animation.timed(with: context, for: self), forKey: animation.keyPath)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -467,3 +468,4 @@ extension RandomAccessCollection {
return segments
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -82,3 +83,4 @@ extension CombinedShapeItem {
name: name)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -84,3 +85,4 @@ struct BezierPathKeyframe: Interpolatable {
cornerRadius: cornerRadius.interpolate(to: to.cornerRadius, amount: amount))
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -158,3 +159,4 @@ extension CALayer {
}

}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -47,3 +48,4 @@ extension Ellipse {
makeCombinedResult: Ellipse.Keyframe.init)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -242,3 +243,4 @@ extension GradientShapeItem {
}
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/Animations/LayerProperty.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -399,3 +400,4 @@ extension CustomizableProperty {
})
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -50,3 +51,4 @@ extension CALayer {
context: context)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -52,3 +53,4 @@ extension Rectangle {
makeCombinedResult: Rectangle.Keyframe.init)
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -234,3 +235,4 @@ extension Trim {
strokeEnd: combinedKeyframes.map { $0.end })
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/Animations/StarAnimation.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -114,3 +115,4 @@ extension Star {
makeCombinedResult: Star.Keyframe.init)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -84,3 +85,4 @@ extension CAShapeLayer {
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -341,3 +342,4 @@ extension TransformModel {
scale.keyframes.contains(where: { $0.value.x < 0 })
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -61,3 +62,4 @@ extension CALayer {
}
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/CompatibilityTracker.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -128,3 +129,4 @@ extension LayerAnimationContext: CompatibilityTrackerProviding {
currentKeypath.fullPath
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/CoreAnimationLayer.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -597,3 +598,4 @@ extension CALayer {
return numberOfSublayersWithTimeRemapping
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -33,3 +34,4 @@ extension CALayer {
protocol CustomLayoutLayer: CALayer {
func layout(superlayerBounds: CGRect)
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -27,3 +28,4 @@ extension KeyframeGroup {
return keyframes[0].value
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -326,3 +327,4 @@ extension KeyframeGroup {
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -44,3 +45,4 @@ extension Keyframes {
return KeyframeGroup(keyframes: ContiguousArray(interpolatedRemappedKeyframes))
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/Layers/AnimationLayer.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -167,3 +168,4 @@ final class LoggingState {
/// has been logged yet for this layer.
var hasLoggedAfterEffectsExpressionsWarning = false
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -31,3 +32,4 @@ class BaseAnimationLayer: CALayer, AnimationLayer {
}

}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -108,3 +109,4 @@ class BaseCompositionLayer: BaseAnimationLayer {
}

}
#endif
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -167,3 +168,4 @@ extension Collection<LayerModel> {
return layersAndMasks
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -95,3 +96,4 @@ extension CALayer {
/// `CGContext.drawLinearGradient` with `[.drawsAfterEndLocation, .drawsBeforeStartLocation]` etc.
static let veryLargeLayerPadding: CGFloat = 10_000
}
#endif
2 changes: 2 additions & 0 deletions Sources/Private/CoreAnimation/Layers/ImageLayer.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -78,3 +79,4 @@ extension ImageLayer: CustomLayoutLayer {
height: CGFloat(imageAsset.height))
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -54,3 +55,4 @@ final class InfiniteOpaqueAnimationLayer: BaseAnimationLayer {
private let additionalPaddingLayer = CALayer()

}
#endif
Original file line number Diff line number Diff line change
@@ -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`
Expand Down Expand Up @@ -57,3 +58,4 @@ extension LayerModel {
}

}
#endif
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -136,3 +137,4 @@ extension MaskCompositionLayer.MaskLayer: AnimationLayer {
})
}
}
#endif
Loading
Loading