Skip to content

Commit

Permalink
macOS Support fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
qapps-forks authored Nov 18, 2022
1 parent 2f00b60 commit 7453907
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
///
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7453907

Please sign in to comment.