import AppIntents /// Siri-/Kurzbefehl-Intent „Gassi gehen": öffnet die App und stößt die /// Aufzeichnung an (über das App-Group-Flag, das die App beim Aktivwerden liest). struct StartWalkIntent: AppIntent { static var title: LocalizedStringResource = "Gassi gehen" static var description = IntentDescription("Startet die Aufzeichnung einer Gassi-Tour in Ban Yaro Go.") static var openAppWhenRun: Bool = true @MainActor func perform() async throws -> some IntentResult { WalkLauncher.requestStartViaAppGroup() WalkLauncher.shared.pendingStart = true // Fast-Path, falls in-process return .result() } } /// Macht den Intent als Siri-Phrase + Kurzbefehl verfügbar (automatisch erkannt). struct BanYaroAppShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: StartWalkIntent(), phrases: [ "Gassi gehen mit \(.applicationName)", "Geh Gassi mit \(.applicationName)", "\(.applicationName) Gassi gehen" ], shortTitle: "Gassi gehen", systemImageName: "figure.walk" ) } }