Lifecycle

public protocol Lifecycle

The Lifecycle Module sends events related to application lifecycle - launch, wake, and sleep.

  • Sends a launch event and gathers all lifecycle data at the time event is triggered.

    Warning

    Only use if lifecycle auto-tracking is disabled.

    Declaration

    Swift

    @discardableResult
    func launch(_ dataObject: DataObject?) -> SingleResult<Void, ModuleError<LifecycleError>>

    Parameters

    dataObject

    Optional data to be sent with launch event.

    Return Value

    A Single onto which you can subscribe to receive the completion with the eventual error in case of failure.

  • Sends a wake event and gathers all lifecycle data at the time event is triggered.

    Warning

    Only use if lifecycle auto-tracking is disabled.

    Declaration

    Swift

    @discardableResult
    func wake(_ dataObject: DataObject?) -> SingleResult<Void, ModuleError<LifecycleError>>

    Parameters

    dataObject

    Optional data to be sent with wake event.

    Return Value

    A Single onto which you can subscribe to receive the completion with the eventual error in case of failure.

  • Sends a sleep event and gathers all lifecycle data at the time event is triggered.

    Warning

    Only use if lifecycle auto-tracking is disabled.

    Declaration

    Swift

    @discardableResult
    func sleep(_ dataObject: DataObject?) -> SingleResult<Void, ModuleError<LifecycleError>>

    Parameters

    dataObject

    Optional data to be sent with sleep event.

    Return Value

    A Single onto which you can subscribe to receive the completion with the eventual error in case of failure.

  • launch() Extension method

    Sends a launch event and gathers all lifecycle data at the time event is triggered.

    Warning

    Only use if lifecycle auto-tracking is disabled.

    Declaration

    Swift

    @discardableResult
    func launch() -> SingleResult<Void, ModuleError<LifecycleError>>

    Return Value

    A Single onto which you can subscribe to receive the completion with the eventual error in case of failure.

  • wake() Extension method

    Sends a wake event and gathers all lifecycle data at the time event is triggered.

    Warning

    Only use if lifecycle auto-tracking is disabled.

    Declaration

    Swift

    @discardableResult
    func wake() -> SingleResult<Void, ModuleError<LifecycleError>>

    Return Value

    A Single onto which you can subscribe to receive the completion with the eventual error in case of failure.

  • sleep() Extension method

    Sends a sleep event and gathers all lifecycle data at the time event is triggered.

    Warning

    Only use if lifecycle auto-tracking is disabled.

    Declaration

    Swift

    @discardableResult
    func sleep() -> SingleResult<Void, ModuleError<LifecycleError>>

    Return Value

    A Single onto which you can subscribe to receive the completion with the eventual error in case of failure.