From b6aea5b9d01e061ba3a734e9ae55cffc4d78f16b Mon Sep 17 00:00:00 2001 From: Jonathan Norris Date: Thu, 10 Aug 2023 12:17:11 -0400 Subject: [PATCH] fix: add docs to DevCycleOptions methods --- DevCycle/Models/DevCycleOptions.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DevCycle/Models/DevCycleOptions.swift b/DevCycle/Models/DevCycleOptions.swift index 7595eb8..6b498f9 100644 --- a/DevCycle/Models/DevCycleOptions.swift +++ b/DevCycle/Models/DevCycleOptions.swift @@ -24,6 +24,7 @@ public class DevCycleOptions { self.options = DevCycleOptions() } + // Controls the interval between flushing events to the DevCycle servers in milliseconds, defaults to 10 seconds. public func flushEventsIntervalMs(_ interval: Int? = 10000) -> OptionsBuilder { self.options.flushEventsIntervalMs = interval return self @@ -35,41 +36,49 @@ public class DevCycleOptions { return self } + // Disables logging of SDK generated events (e.g. variableEvaluated, variableDefaulted) to DevCycle. public func disableAutomaticEventLogging(_ disable: Bool) -> OptionsBuilder{ self.options.disableAutomaticEventLogging = disable return self } + // Disables logging of custom events generated by calling .track() method to DevCycle. public func disableCustomEventLogging(_ disable: Bool) -> OptionsBuilder{ self.options.disableCustomEventLogging = disable return self } + // Controls the log level of the SDK, defaults to `error` public func logLevel(_ level: LogLevel) -> OptionsBuilder { self.options.logLevel = level return self } + // Enables the usage of EdgeDB for DevCycle that syncs User Data to DevCycle. public func enableEdgeDB(_ enable: Bool) -> OptionsBuilder { self.options.enableEdgeDB = enable return self } + // Disable the use of cached configs public func disableConfigCache(_ disable: Bool) -> OptionsBuilder { self.options.disableConfigCache = disable return self } + // The maximum allowed age of a cached config in milliseconds, defaults to 7 days public func configCacheTTL(_ ttl: Int = 604800000) -> OptionsBuilder { self.options.configCacheTTL = ttl return self } + // Disable Realtime Update and their SSE connection. public func disableRealtimeUpdates(_ disable: Bool) -> OptionsBuilder { self.options.disableRealtimeUpdates = disable return self } + // Allows the SDK to communicate with a proxy of DevCycle APIs. public func apiProxyURL(_ proxyURL: String) -> OptionsBuilder { self.options.apiProxyURL = proxyURL return self