Read the iPhone's own name for its host and tailnet node
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user