fix(apple/M3): import AppIntents for Button(intent:) + drop deprecated Text+

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) <noreply@anthropic.com>
This commit is contained in:
2026-07-16 19:49:52 +02:00
parent 09e2043ce0
commit 6d2e738070
2 changed files with 13 additions and 4 deletions
@@ -7,6 +7,7 @@
// Text(timerInterval:) no per-second push. // Text(timerInterval:) no per-second push.
import ActivityKit import ActivityKit
import AppIntents
import SwiftUI import SwiftUI
import WidgetKit import WidgetKit
@@ -104,10 +105,13 @@ private struct StageLine: View {
EmptyView() EmptyView()
case .background: case .background:
if let deadline = state.backgroundDeadline { if let deadline = state.backgroundDeadline {
Text("Keeps running for ") HStack(spacing: 3) {
.font(.caption2).foregroundStyle(.secondary) Text("Keeps running for")
+ Text(timerInterval: Date()...deadline, countsDown: true) Text(timerInterval: Date()...deadline, countsDown: true)
.font(.caption2).monospacedDigit() .monospacedDigit()
}
.font(.caption2)
.foregroundStyle(.secondary)
} else { } else {
badge("Running in background", .orange) badge("Running in background", .orange)
} }
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>