From 44e0ca9127d0618dc4a525e961d327a50c4c99b2 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 1 Apr 2023 16:24:27 +0200 Subject: [PATCH] Force Mac "Catalyst" idiom in debug log (#276) Mac Catalyst incorrectly reported as "Pad". --- .../PassepartoutLibrary/Extensions/DebugLog+Extensions.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PassepartoutLibrary/Sources/PassepartoutLibrary/Extensions/DebugLog+Extensions.swift b/PassepartoutLibrary/Sources/PassepartoutLibrary/Extensions/DebugLog+Extensions.swift index a3673c72..05598a81 100644 --- a/PassepartoutLibrary/Sources/PassepartoutLibrary/Extensions/DebugLog+Extensions.swift +++ b/PassepartoutLibrary/Sources/PassepartoutLibrary/Extensions/DebugLog+Extensions.swift @@ -38,7 +38,11 @@ extension DebugLog { #if os(iOS) let device: UIDevice = .current osVersion = "\(device.systemName) \(device.systemVersion)" + #if targetEnvironment(macCatalyst) + deviceType = "\(device.model) (Catalyst)" + #else deviceType = "\(device.model) (\(device.userInterfaceIdiom.debugDescription))" + #endif #else let os = ProcessInfo().operatingSystemVersion osVersion = "macOS \(os.majorVersion).\(os.minorVersion).\(os.patchVersion)"