The SwiftUI app bundles the Go swarm engine through gomobile, so an iPhone is a real peer using the existing PAKE handshake, chunk verification, and relay fallback. XcodeGen builds the project and devicectl installs it on the paired phone.
24 lines
422 B
Swift
24 lines
422 B
Swift
import SwiftUI
|
|
|
|
@main
|
|
struct ShareApp: App {
|
|
@StateObject private var model: AppModel
|
|
|
|
init() {
|
|
let model = AppModel()
|
|
_model = StateObject(wrappedValue: model)
|
|
Task { @MainActor in
|
|
SelfTest.runIfRequested(model: model)
|
|
}
|
|
}
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
RootView()
|
|
.environmentObject(model)
|
|
.preferredColorScheme(.dark)
|
|
.tint(Theme.mint)
|
|
}
|
|
}
|
|
}
|