From db8a67310ce72bdd3f17f07d2503134190b0e948 Mon Sep 17 00:00:00 2001 From: NachoSoto Date: Wed, 25 Oct 2023 20:24:34 -0700 Subject: [PATCH] `PaywallColor`: change visibility of `Color.init(light:dark:)` to `private` (#3345) Fixes #3344. This wasn't meant to be `public` as it's only used within the `RevenueCat` framework and can lead to conflicts. --- Sources/Paywalls/PaywallColor.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Sources/Paywalls/PaywallColor.swift b/Sources/Paywalls/PaywallColor.swift index a6e4da5775..e0640b247f 100644 --- a/Sources/Paywalls/PaywallColor.swift +++ b/Sources/Paywalls/PaywallColor.swift @@ -180,17 +180,16 @@ private extension Color { self.init(UIColor(light: light, dark: dark)) } -} - -@available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.2, *) -public extension Color { - - /// Creates a `Color` given a light and a dark `Color`. @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) init(light: Color, dark: Color) { self.init(light: UIColor(light), dark: UIColor(dark)) } +} + +@available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.2, *) +public extension Color { + /// Converts a `Color` into a `PaywallColor`. /// - Warning: This `PaywallColor` won't be able to be encoded, /// its ``PaywallColor/stringRepresentation`` will be undefined.