Other Protocols
The following protocols are available globally.
-
Protocol for all Analytics related Events
See moreDeclaration
Swift
@MainActor @preconcurrency @objc public protocol MoEngageAnalyticsCallBack : Sendable
-
Observer for SDK-autonomous events (e.g. background batch sync results). Register via
See moreMoEngage.registerSDKEventObserver(_:forWorkspaceId:)after SDK init for the workspace; pre-init registrations are dropped with a warning. Each registration is workspace-scoped;accountMetaon the callback identifies the originating workspace. Multiple observers fire in registration order; the same observer registered twice fires twice.onSDKEventis invoked on the main thread.Declaration
Swift
@objc(MoEngageSDKEventObserver) public protocol MoEngageSDKEventObserver -
Swift-only typed surface for
See moreMoEngageBaseTasksubclasses. Each subclass binds concreteSuccessandFailuretypes; the protocol extension provides typedonSuccess/onFailureand anasync throwsresult(). ObjC consumers use theAny-typed methods on the base class.Declaration
Swift
public protocol MoEngageTaskProtocol : AnyObject
-
Date provider abstraction for testability
Provides a consistent interface for obtaining the current date/time, allowing for deterministic time-based testing through mock implementations.
See moreDeclaration
Swift
public protocol MoEngageDateProvider
-
Delegate for in-app action handling callbacks.
See moreDeclaration
Swift
@objc public protocol MoEngageInAppActionHandlerDelegate
-
Shared shape for any shown-campaign success result (
See moreMoEngageShowInAppResultandMoEngageShowNudgeResult). Lets customers write cross-cutting code (logging, analytics passthrough) that handles “campaign shown” events regardless of category.Declaration
Swift
@objc public protocol MoEngageShownCampaign -
Declaration
Swift
@objc public protocol MoEngageInAppModeling -
Declaration
Swift
@objc public protocol MoEngageTestInAppProtocol -
Protocol that both MoEngageActivityAttributes and MoEngageTransactionActivityAttributes conform to
See moreDeclaration
Swift
@available(iOS 18, *) public protocol MoEngageActivityAttributesProtocol : ActivityAttributes where Self.ContentState : MoEngageContentStateProtocol -
Protocol for campaign data that both regular and transaction campaigns conform to
See moreDeclaration
Swift
@available(iOS 18, *) public protocol MoEngageCampaignProtocol : Decodable, Encodable, Hashable -
Protocol for instance data that both regular and transaction instances conform to
See moreDeclaration
Swift
@available(iOS 18, *) public protocol MoEngageInstanceProtocol : Decodable, Encodable, Hashable -
Protocol for content state that both regular and transaction content states conform to
See moreDeclaration
Swift
@available(iOS 18, *) public protocol MoEngageContentStateProtocol : Decodable, Encodable, Hashable -
Protocol defining common properties for campaign result types
See moreDeclaration
Swift
@available(iOS 18, *) public protocol CampaignResultProtocol -
Protocol defining common properties for campaign models
See moreDeclaration
Swift
@available(iOS 18, *) public protocol CampaignProtocol
Other Protocols Reference