LiveActivityOrigin
An enumeration that defines whether a Live Activity was started locally by the app or remotely via a push-to-start notification.
iOS Enum - LiveActivityOrigin
Available in iOS 16.1 and later.
Copied to your clipboard@available(iOS 16.1, *)public enum LiveActivityOrigin: String, Codable {case localcase remote}
Cases
local
Indicates that the Live Activity was started locally by the app using ActivityKit APIs.
Copied to your clipboardcase local
This value is set when the app calls Activity.request() to start a Live Activity.
remote
Indicates that the Live Activity was started remotely via a push-to-start notification from Adobe Journey Optimizer.
Copied to your clipboardcase remote
This value is set when Adobe Journey Optimizer sends a push-to-start notification (iOS 17.2+) that creates the Live Activity.
Usage
The origin property is automatically set by the SDK and is included in the LiveActivityData struct. You typically don't need to set this value manually.
Copied to your clipboard// The origin is automatically determined when the Live Activity is createdlet attributes = FoodDeliveryLiveActivityAttributes(liveActivityData: LiveActivityData(liveActivityID: "order123"),restaurantName: "Pizza Palace")// After the Live Activity is started, you can check its originif let origin = attributes.liveActivityData.origin {switch origin {case .local:print("Live Activity was started locally")case .remote:print("Live Activity was started remotely")}}
