class UI::LiveActivities

Overview

Container for exported live activity state.

This is the app-facing surface for building ActivityKit-style state dumps for a host, build step, or validation pipeline.

Defined in:

ui/live_activities.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(application_name : String, bundle_identifier : String | Nil = nil, activities : Array(LiveActivity) | Nil = nil) #

[View source]

Instance Method Detail

def activities : Array(LiveActivity) #

[View source]
def activities=(activities : Array(LiveActivity)) #

[View source]
def add_activity(attributes_type : String, identifier : String | Nil = nil, attributes : Hash(String, String) = {} of String => String, content_state : Hash(String, String) = {} of String => String, update_intent : LiveActivityUpdateIntent | Nil = nil, is_active : Bool = true, &block : LiveActivity -> Nil) : LiveActivity #

[View source]
def add_activity(attributes_type : String, identifier : String | Nil = nil, attributes : Hash(String, String) = {} of String => String, content_state : Hash(String, String) = {} of String => String, update_intent : LiveActivityUpdateIntent | Nil = nil, is_active : Bool = true) : LiveActivity #

[View source]
def add_activity(activity : LiveActivity) : LiveActivity #

[View source]
def application_name : String #

[View source]
def application_name=(application_name : String) #

[View source]
def bundle_identifier : String | Nil #

[View source]
def bundle_identifier=(bundle_identifier : String | Nil) #

[View source]
def clear : Nil #

[View source]
def export_activitykit_scaffold : String #

Export a conservative Swift/ActivityKit scaffold for the full collection.

The scaffold is deterministic and extension-oriented: it uses stable ordering, typed string placeholders, and static metadata constants so a later build step can map the export into ActivityKit or WidgetKit code.


[View source]
def find_activity(identifier : String) : LiveActivity | Nil #

[View source]
def remove_activity(identifier : String) : Bool #

[View source]
def to_payload : String #

[View source]