Introduces a new SwiftUI app with HTTP REST device control, mock mode for UI development, BLE-based discovery, and documented architecture aligned with the firmware API. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
535 B
Swift
21 lines
535 B
Swift
import SwiftUI
|
|
|
|
@main
|
|
struct igiRadioApp: App {
|
|
@State private var environment = AppEnvironment()
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
RootView()
|
|
.environment(environment)
|
|
.task {
|
|
#if DEBUG
|
|
if environment.useMockDevice, !environment.state.connection.isConnected {
|
|
try? await environment.digiRadio.connect(host: "mock.local")
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
}
|