MoEngageSDKEventObserver
@objc(MoEngageSDKEventObserver)
public protocol MoEngageSDKEventObserver
Observer for SDK-autonomous events (e.g. background batch sync results).
Register via MoEngage.registerSDKEventObserver(_:forWorkspaceId:) after SDK init
for the workspace; pre-init registrations are dropped with a warning. Each
registration is workspace-scoped; accountMeta on the callback identifies the
originating workspace. Multiple observers fire in registration order; the same
observer registered twice fires twice. onSDKEvent is invoked on the main thread.
-
Receive an SDK-autonomous event. Use
if let typed = event as? ...to dispatch on a concrete subclass; unknown future subtypes are skipped.Declaration
Swift
@MainActor func onSDKEvent(accountMeta: MoEngageAccountMeta, event: MoEngageSDKEvent)