We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b50179d commit f3af7a1Copy full SHA for f3af7a1
Sources/DeviceIdentificator/DeviceModel.swift
@@ -6,7 +6,7 @@ import Foundation
6
public indirect enum DeviceModel: Equatable, CaseIterable, CustomStringConvertible {
7
public static let current: DeviceModel = {
8
#if os(macOS)
9
- let service = IOServiceGetMatchingService(kIOMasterPortDefault,
+ let service = IOServiceGetMatchingService(kIOMainPortDefault,
10
IOServiceMatching("IOPlatformExpertDevice"))
11
var modelIdentifier: String?
12
if let modelData = IORegistryEntryCreateCFProperty(service, "model" as CFString, kCFAllocatorDefault, 0).takeRetainedValue() as? Data {
0 commit comments