diff --git a/Sources/Core/Tracker/TrackerDefaults.swift b/Sources/Core/Tracker/TrackerDefaults.swift index b98afd409..b5e79f7f4 100644 --- a/Sources/Core/Tracker/TrackerDefaults.swift +++ b/Sources/Core/Tracker/TrackerDefaults.swift @@ -24,7 +24,7 @@ class TrackerDefaults { private(set) static var screenContext = true private(set) static var applicationContext = true private(set) static var autotrackScreenViews = true - private(set) static var lifecycleEvents = false + private(set) static var lifecycleEvents = true private(set) static var exceptionEvents = true private(set) static var installEvent = true private(set) static var trackerDiagnostic = false diff --git a/Sources/Snowplow/Configurations/TrackerConfiguration.swift b/Sources/Snowplow/Configurations/TrackerConfiguration.swift index dfe20eeaa..5fcf85001 100644 --- a/Sources/Snowplow/Configurations/TrackerConfiguration.swift +++ b/Sources/Snowplow/Configurations/TrackerConfiguration.swift @@ -57,6 +57,7 @@ public protocol TrackerConfigurationProtocol: AnyObject { @objc var screenEngagementAutotracking: Bool { get set } /// Whether to enable automatic tracking of background and foreground transitions. + /// Enabled by default. @objc var lifecycleAutotracking: Bool { get set } /// Whether to enable automatic tracking of install event. @@ -207,6 +208,7 @@ public class TrackerConfiguration: SerializableConfiguration, TrackerConfigurati private var _lifecycleAutotracking: Bool? /// Whether to enable automatic tracking of background and foreground transitions. + /// Enabled by default. @objc public var lifecycleAutotracking: Bool { get { return _lifecycleAutotracking ?? sourceConfig?.lifecycleAutotracking ?? TrackerDefaults.lifecycleEvents } @@ -479,6 +481,7 @@ public class TrackerConfiguration: SerializableConfiguration, TrackerConfigurati } /// Whether to enable automatic tracking of background and foreground transitions. + /// Enabled by default. @objc public func lifecycleAutotracking(_ lifecycleAutotracking: Bool) -> Self { self.lifecycleAutotracking = lifecycleAutotracking