Skip to main content

userDidStopWatchingEvent

MaestroKit provides the userDidStopWatchingEvent function to notify the SDK when a user closes an event that was previously open in the app's player. This call helps the SDK perform necessary cleanup and state management for the event. Once the event is closed, the SDK can release any resources associated with it and update its internal state accordingly.

When you invoke this function, the SDK:

  • Cleans Up Resources: Releases any internal references and resources tied to the event.
  • Updates State: Adjusts its internal state to reflect that the event is no longer active.
ParameterTypeDescriptionExample
eventIDStringThe unique identifier for the event that was closed."event123"

Code Example

Task {
await MaestroManager.shared.userDidStopWatchingEvent("event123")
// The SDK processes the closure of the event with ID "event123".
}