A real iOS Xcode app (ios/NucleicRemote) linking the NucleicProtocol SwiftPM library as a local package. Builds for the iOS 27 simulator and launches to the pairing screen. - Transport: NWFrameChannel (NWConnection) + LANDiscovery (Bonjour _nucleic._tcp). - Engine: drives NucleicProtocol.SyncClient (Noise XXpsk0 pair / IK reconnect, hello/welcome, HostMsg→Event stream). - State: RemoteStore (ObservableObject) — the single on-device projection of host state; IdentityStore persists the device identity (Keychain) + pinned host. - UI (UX_IOS): attention-first SessionsView, SessionDetailView (transcript/diff + status-driven action area / composer), ApprovalCardView with Face ID gate on high-risk approvals + allow-always menu, PairingScannerView (AVFoundation QR), SettingsView, connection chip. Same status glyphs/semantics as the Mac. Add-iPhone QR display + server start live on the macOS side (follow-up); push / Live Activity are M5 (needs the relay). gitignore keeps this .xcodeproj despite the blanket *.xcodeproj rule. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
26 lines
814 B
Swift
26 lines
814 B
Swift
import SwiftUI
|
|
|
|
/// Persistent connectivity indicator (UX_IOS §6). Connectivity is unambiguous: green LAN
|
|
/// when live, amber while reconnecting, gray when the Mac is unreachable.
|
|
struct ConnectionChip: View {
|
|
@EnvironmentObject var store: RemoteStore
|
|
|
|
var body: some View {
|
|
HStack(spacing: 6) {
|
|
Circle().fill(color).frame(width: 8, height: 8)
|
|
Text(store.connectivity.label).font(.footnote.weight(.medium))
|
|
}
|
|
.padding(.horizontal, 12).padding(.vertical, 6)
|
|
.background(.ultraThinMaterial, in: Capsule())
|
|
}
|
|
|
|
private var color: Color {
|
|
switch store.connectivity {
|
|
case .connected: .green
|
|
case .connecting, .reconnecting: .orange
|
|
case .hostOffline, .unpaired: .gray
|
|
case .failed: .red
|
|
}
|
|
}
|
|
}
|