MoEngageSDKLiveActivity
@available(iOS 18, *)
public enum MoEngageSDKLiveActivity
Type to manage Live Activities on the MoEngage Platform.
-
Track activity started event for the passed activity.
Declaration
Swift
@available(iOSApplicationExtension, unavailable) public static func trackStarted<AppAttributes: ActivityAttributes>( activity: MoEngageActivity<AppAttributes>, file: StaticString = #file, fileId: StaticString = #fileID, method: StaticString = #function, line: UInt = #line, column: UInt = #column )
Parameters
activity
The activity created.
-
Create Live Activity campaign attributes.
Declaration
Swift
public static func createAttributes<AppAttributes: ActivityAttributes>( withCampaign campaign: Campaign<AppAttributes>, file: StaticString = #file, fileId: StaticString = #fileID, method: StaticString = #function, line: UInt = #line, column: UInt = #column, completion: @escaping @MainActor(unsafe) (Campaign<AppAttributes>.Result?) -> Void )
Parameters
campaign
The campaign attributes the live activity is populated with.
completion
The campiagn attributes result passed to this action.
-
Create Live Activity campaign attributes.
Declaration
Swift
public static func createAttributes<AppAttributes: ActivityAttributes>( withCampaign campaign: Campaign<AppAttributes>, file: StaticString = #file, fileId: StaticString = #fileID, method: StaticString = #function, line: UInt = #line, column: UInt = #column ) async -> Campaign<AppAttributes>.Result?
Parameters
campaign
The campaign attributes the live activity is populated with.
Return Value
The campiagn attributes result.
-
The MoEngage Live Activity campaign data.
See moreDeclaration
Swift
public struct Campaign<AppAttributes> where AppAttributes : ActivityAttributes