LifecycleSettingsBuilder

public class LifecycleSettingsBuilder : CollectorSettingsBuilder

Builder for configuring Lifecycle module settings.

  • Declaration

    Swift

    public func setSessionTimeoutInMinutes(_ sessionTimeoutInMinutes: Int) -> LifecycleSettingsBuilder

    Parameters

    sessionTimeoutInMinutes

    If this timeout has been exceeded while the app is backgrounded, the next foreground event will be treated as a launch, rather than a wake. You can pass -1 for the infinite session duration. Default is 24 * 60 (1 day).

  • Declaration

    Swift

    public func setAutoTrackingEnabled(_ autoTrackingEnabled: Bool) -> LifecycleSettingsBuilder

    Parameters

    autoTrackingEnabled

    If it’s false, lifecycle calls must be made manually, or lifecycle metrics will be incorrect. If it’s true, manual tracking calls are discarded. Default is true.

  • Declaration

    Swift

    public func setTrackedLifecycleEvents(_ trackedLifecycleEvents: [LifecycleEvent]) -> LifecycleSettingsBuilder

    Parameters

    trackedLifecycleEvents

    Lifecycle events to be tracked. By default all of them are.

  • Declaration

    Swift

    public func setDataTarget(_ dataTarget: LifecycleDataTarget) -> LifecycleSettingsBuilder

    Parameters

    dataTarget

    If it’s .lifecycleEventsOnly, lifecycle data will only be attached to lifecycle events, and not to any others.