From 6d2e73807013c0439173a7bf47177d4eda8e432f Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 16 Jul 2026 19:49:52 +0200 Subject: [PATCH] fix(apple/M3): import AppIntents for Button(intent:) + drop deprecated Text+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Live Activity's End button uses Button(intent:), whose initializer lives in _AppIntents_SwiftUI — reached via `import AppIntents` (was missing, so the widget target failed to build). Also replaced the iOS-26-deprecated Text + Text concatenation in the background countdown with an HStack. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../apple/PunktfunkWidgets/SessionLiveActivity.swift | 12 ++++++++---- clients/apple/PunktfunkWidgetsExtension.entitlements | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 clients/apple/PunktfunkWidgetsExtension.entitlements diff --git a/clients/apple/PunktfunkWidgets/SessionLiveActivity.swift b/clients/apple/PunktfunkWidgets/SessionLiveActivity.swift index d2ea7ed5..a51fd613 100644 --- a/clients/apple/PunktfunkWidgets/SessionLiveActivity.swift +++ b/clients/apple/PunktfunkWidgets/SessionLiveActivity.swift @@ -7,6 +7,7 @@ // Text(timerInterval:) — no per-second push. import ActivityKit +import AppIntents import SwiftUI import WidgetKit @@ -104,10 +105,13 @@ private struct StageLine: View { EmptyView() case .background: if let deadline = state.backgroundDeadline { - Text("Keeps running for ") - .font(.caption2).foregroundStyle(.secondary) - + Text(timerInterval: Date()...deadline, countsDown: true) - .font(.caption2).monospacedDigit() + HStack(spacing: 3) { + Text("Keeps running for") + Text(timerInterval: Date()...deadline, countsDown: true) + .monospacedDigit() + } + .font(.caption2) + .foregroundStyle(.secondary) } else { badge("Running in background", .orange) } diff --git a/clients/apple/PunktfunkWidgetsExtension.entitlements b/clients/apple/PunktfunkWidgetsExtension.entitlements new file mode 100644 index 00000000..0c67376e --- /dev/null +++ b/clients/apple/PunktfunkWidgetsExtension.entitlements @@ -0,0 +1,5 @@ + + + + +