Added the "reset()" method to the Reporting protocol in the Recording feature target to discard leftover Live Activities at launch and set a stale date on recording activities.

This commit is contained in:
2026-07-06 23:05:24 +02:00
parent f443d434f2
commit b3f0826122
5 changed files with 53 additions and 3 deletions
@@ -33,4 +33,9 @@ public protocol Reporting: Sendable {
/// Reports the end of the recording flow.
func ended() async
/// Discards any reporting surface left over from an earlier run of the app a Live Activity the app was killed before it could
/// end, for example so an abandoned surface never outlives the process that created it. Meant to be called once at launch,
/// before any recording starts.
func reset() async
}
@@ -23,4 +23,7 @@ struct DummyReporting: Reporting {
/// Swallows the end of the recording flow.
func ended() async {}
/// Swallows the request to discard any leftover reporting surface.
func reset() async {}
}
@@ -50,4 +50,8 @@ final class ReportingMock: Reporting {
reports.append("ended")
}
func reset() async {
reports.append("reset")
}
}