fix: Live Activity concurrency and state observation
- Add Sendable conformance to MusicActivityAttributes.ContentState - Remove @preconcurrency on ActivityKit import - Use nonisolated(unsafe) guards for Activity refs in task closures - Add observeActivityState() to handle stale/ended/dismissed activity states - Set staleDate (120s) instead of nil for push notification support
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import ActivityKit
|
||||
|
||||
struct MusicActivityAttributes: ActivityAttributes {
|
||||
public struct ContentState: Codable, Hashable {
|
||||
public struct ContentState: Codable, Hashable, Sendable {
|
||||
var title: String
|
||||
var artist: String
|
||||
var isPlaying: Bool
|
||||
|
||||
Reference in New Issue
Block a user