fix(conversation-assistant): fix Swift compilation errors in APIClient
- Replace force unwrap on non-optional deviceId with if-let pattern - Remove unused uuidBytes variable declaration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
85434d7938
commit
301a0fbc91
1 changed files with 6 additions and 3 deletions
|
|
@ -56,14 +56,18 @@ class APIClient {
|
|||
}
|
||||
|
||||
func verifyDevice(code: String) async throws {
|
||||
guard let deviceId = deviceId else {
|
||||
let currentDeviceId: String
|
||||
if let existingId = deviceId {
|
||||
currentDeviceId = existingId
|
||||
} else {
|
||||
// Register first if no device ID
|
||||
let (newId, _) = try await registerDevice()
|
||||
self.deviceId = newId
|
||||
currentDeviceId = newId
|
||||
}
|
||||
|
||||
let params: [String: String] = [
|
||||
"deviceId": deviceId!,
|
||||
"deviceId": currentDeviceId,
|
||||
"code": code
|
||||
]
|
||||
|
||||
|
|
@ -118,7 +122,6 @@ class APIClient {
|
|||
IOServiceMatching("IOPlatformExpertDevice")
|
||||
)
|
||||
|
||||
var uuidBytes: Unmanaged<CFTypeRef>?
|
||||
let result = IORegistryEntryCreateCFProperty(
|
||||
service,
|
||||
"IOPlatformUUID" as CFString,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue