Read the iPhone's own name for its host and tailnet node

This commit is contained in:
Ian Gulliver
2026-10-22 09:25:15 -07:00
parent fedd4ad673
commit 08fe45814e
4 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -4,6 +4,9 @@ import HTTPTypes
import OpenAPIRuntime
import OpenAPIURLSession
import os
#if os(iOS)
import UIKit
#endif
let log = Logger(subsystem: "run.fc.byre.mac", category: "byre")
@@ -104,7 +107,7 @@ private let clientID = newID("cli")
#if os(macOS)
let deviceName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
#else
let deviceName = deviceKind
let deviceName = MainActor.assumeIsolated { UIDevice.current.name }
#endif
final class API: Sendable {