From 7453907167127bc77e27d86157fb81dfcd60c398 Mon Sep 17 00:00:00 2001 From: QApps Dev Forks Date: Thu, 17 Nov 2022 20:04:00 -0500 Subject: [PATCH] macOS Support fix 2 --- Source/Device.generated.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Device.generated.swift b/Source/Device.generated.swift index 74d2a03c..8f1f364b 100644 --- a/Source/Device.generated.swift +++ b/Source/Device.generated.swift @@ -47,7 +47,7 @@ import UIKit /// } /// public enum Device { - #if os(macOS) + #if targetEnvironment(macCatalyst) #elseif os(iOS) /// Device is an [iPod touch (5th generation)](https://support.apple.com/kb/SP657) /// @@ -479,7 +479,7 @@ public enum Device { /// /// - returns: An initialized `Device`. public static func mapToDevice(identifier: String) -> Device { // swiftlint:disable:this cyclomatic_complexity function_body_length - #if os(macOS) + #if targetEnvironment(macCatalyst) return unknown(identifier) #elseif os(iOS) switch identifier { @@ -1325,7 +1325,7 @@ extension Device: CustomStringConvertible { /// A textual representation of the device. public var description: String { - #if os(macOS) + #if targetEnvironment(macCatalyst) return "Mac" #elseif os(iOS) switch self { @@ -1448,7 +1448,7 @@ extension Device: CustomStringConvertible { /// Device.iPhoneXR.description: iPhone Xʀ /// Device.iPhoneXR.safeDescription: iPhone XR public var safeDescription: String { - #if os(macOS) + #if targetEnvironment(macCatalyst) return "Mac" #elseif os(iOS) switch self { @@ -2033,7 +2033,7 @@ extension Device { extension Device { public enum CPU: Comparable { - #if os(macOS) + #if targetEnvironment(macCatalyst) case unknown #elseif os(iOS) || os(tvOS) case a4 @@ -2074,7 +2074,7 @@ extension Device { /// Returns the cpu (SoC) that the device uses public var cpu: CPU { - #if os(macOS) + #if targetEnvironment(macCatalyst) return .unknown #elseif os(iOS) switch self { @@ -2197,7 +2197,7 @@ extension Device.CPU: CustomStringConvertible { /// A textual representation of the device. public var description: String { - #if os(macOS) + #if targetEnvironment(macCatalyst) return "unknown" #elseif os(iOS) || os(tvOS) switch self {