Files
tianma-if cd4f010d8f feat(ios): add native SwiftUI client with Android UI parity
Replace the abandoned RN iOS path with a SwiftUI app (iOS 17+) that reuses
the shared TipTap editor bundle, GRDB local mirror/outbox, and Android-aligned
shell chrome for list, create, detail, and Me. Package the editor HTML in the
app resources so Markdown renders, present edit from the workspace root with a
UIKit FAB, and keep caret stable while typing.
2026-08-07 02:52:01 +08:00

14 lines
500 B
Swift

import Foundation
enum DeviceId {
/// Stable per-install device id sent with login (`deviceId`), matching RN `edgeever.mobile.device-id`.
static func getOrCreate() throws -> String {
if let existing = try KeychainStore.string(forKey: KeychainStore.Key.deviceId), !existing.isEmpty {
return existing
}
let id = "mobile-\(UUID().uuidString.lowercased())"
try KeychainStore.setString(id, forKey: KeychainStore.Key.deviceId)
return id
}
}