Let the user name the iPhone in Settings

This commit is contained in:
Ian Gulliver
2026-10-22 10:43:24 -07:00
parent 8fb27f98a2
commit 643b04b760
6 changed files with 44 additions and 10 deletions
+2 -1
View File
@@ -107,7 +107,8 @@ private let clientID = newID("cli")
#if os(macOS)
let deviceName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
#else
let deviceName = MainActor.assumeIsolated { UIDevice.current.name }
let deviceNameKey = "deviceName"
let deviceName = UserDefaults.standard.string(forKey: deviceNameKey) ?? deviceKind
#endif
final class API: Sendable {