Hello everyone,
I have an app leveraging SwiftData, App Intents, Interactive Widgets, and a Control Center Widget. I recently added Live Activity support, and I’m using an App Intent to trigger the activity whenever the model changes.
When the App Intent is called from within the app, the Live Activity is created successfully and appears on both the Lock Screen and in the Dynamic Island. However, if the same App Intent is invoked from a widget, the model is updated as expected, but no Live Activity is started.
Here’s the relevant code snippet where I call the Live Activity:
`
await LiveActivityManager.shared.newSessionActivity(session: session)
And here’s how my attribute is defined:
struct ContentState: Codable, Hashable {
var session: Session
}
}
Is there any known limitation or workaround for triggering a Live Activity when the App Intent is initiated from a widget? Any guidance or best practices would be greatly appreciated.
Thank you!
David