Force Mac "Catalyst" idiom in debug log (#276)

Mac Catalyst incorrectly reported as "Pad".
This commit is contained in:
Davide De Rosa 2023-04-01 16:24:27 +02:00 committed by GitHub
parent 33e0ceec04
commit 44e0ca9127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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)"