class
UI::LiveActivities
- UI::LiveActivities
- Reference
- Object
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.crConstructors
Instance Method Summary
- #activities : Array(LiveActivity)
- #activities=(activities : Array(LiveActivity))
- #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
- #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
- #add_activity(activity : LiveActivity) : LiveActivity
- #application_name : String
- #application_name=(application_name : String)
- #bundle_identifier : String | Nil
- #bundle_identifier=(bundle_identifier : String | Nil)
- #clear : Nil
-
#export_activitykit_scaffold : String
Export a conservative Swift/ActivityKit scaffold for the full collection.
- #find_activity(identifier : String) : LiveActivity | Nil
- #remove_activity(identifier : String) : Bool
- #to_payload : String
Constructor Detail
def self.new(application_name : String, bundle_identifier : String | Nil = nil, activities : Array(LiveActivity) | Nil = nil)
#
Instance Method Detail
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
#
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
#
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.