Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(device_info_plus): Fix deprecation warning on MacOS #2377

Merged
merged 6 commits into from
Nov 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix macOS warrning for device_info_plus
  • Loading branch information
Ellet committed Nov 12, 2023
commit 084a1537ec4edfac71717e5b5a92cb7f75a6bc4b
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ public struct SystemUUID {

public static func getSystemUUID() -> String? {
let dev = IOServiceMatching("IOPlatformExpertDevice")
let platformExpert: io_service_t = IOServiceGetMatchingService(kIOMasterPortDefault, dev)
let platformExpert: io_service_t = IOServiceGetMatchingService(kIOMainPortDefault, dev)
EchoEllet marked this conversation as resolved.
Show resolved Hide resolved
let serialNumberAsCFString = IORegistryEntryCreateCFProperty(platformExpert, kIOPlatformUUIDKey as CFString, kCFAllocatorDefault, 0)
IOObjectRelease(platformExpert)
let ser: CFTypeRef? = serialNumberAsCFString?.takeUnretainedValue()
Loading