open-remora

Open Remora, a free secondary dive computer for Apple Watch Ultra
git clone https://git.schurger.org/open-remora.git
Log | Files | Refs | README | LICENSE

OpenRemoraApp.swift (749B)


      1 // SPDX-License-Identifier: GPL-2.0-only
      2 import SwiftUI
      3 import RemoraUI
      4 
      5 /// iPhone app: the bridge between the watch and Sub Rascasse (which acts as the logbook).
      6 /// Settings are changed on the watch; here they are only displayed.
      7 @main
      8 struct OpenRemoraApp: App {
      9     @State private var store = PhoneStore()
     10 
     11     var body: some Scene {
     12         WindowGroup {
     13             HomeView()
     14                 .requiresTerms(AppTerms.terms)
     15                 .environment(store)
     16                 .task {
     17                     if CommandLine.arguments.contains("-demo") { store.seedDemo() } else {
     18                         store.activate()
     19                         await store.notifier.requestAuthorization()
     20                     }
     21                 }
     22         }
     23     }
     24 }