Skip to main content

Lifecycle Management

Flush on Demand​

Events are delivered automatically (batch size, periodic interval, app foreground/background, network reconnect). Call flush() only when delivery must not wait for the next trigger:

B2MAnalytics.shared.flush()

Shutdown​

Stops timers and observers after one final delivery attempt. Undelivered events stay on disk and are sent after the next start:

B2MAnalytics.shared.shutdown()

Logging​

Control SDK log verbosity (default: .off):

B2MAnalytics.shared.logLevel = .info // .off, .error, .warning, .info, .debug