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.
14 lines
500 B
Swift
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
|
|
}
|
|
}
|