Lifecycle Protocol Reference
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>>Parameter Description dataObjectOptional data to be sent with launch event.
Return Value
A
Singleonto 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>>Parameter Description dataObjectOptional data to be sent with wake event.
Return Value
A
Singleonto 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>>Parameter Description dataObjectOptional data to be sent with sleep event.
Return Value
A
Singleonto which you can subscribe to receive the completion with the eventual error in case of failure. -
launch()Extension methodSends 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
Singleonto which you can subscribe to receive the completion with the eventual error in case of failure. -
wake()Extension methodSends 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
Singleonto which you can subscribe to receive the completion with the eventual error in case of failure. -
sleep()Extension methodSends 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
Singleonto which you can subscribe to receive the completion with the eventual error in case of failure.