From 23502924ed9e08b45d8212d7b6d6dc5baa832ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Fri, 3 May 2024 19:14:01 +0200 Subject: [PATCH] Shorten configuration parameter to config --- Sources/TelemetryClient/TelemetryClient.swift | 2 +- Sources/TelemetryClient/TelemetryDeck.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/TelemetryClient/TelemetryClient.swift b/Sources/TelemetryClient/TelemetryClient.swift index 0583851..43a7559 100644 --- a/Sources/TelemetryClient/TelemetryClient.swift +++ b/Sources/TelemetryClient/TelemetryClient.swift @@ -188,7 +188,7 @@ public class TelemetryManager { initializedTelemetryManager != nil } - @available(*, deprecated, renamed: "TelemetryDeck.initialize(configuration:)", message: "This call was renamed to `TelemetryDeck.initialize(configuration:)`. Please migrate – a fix-it is available.") + @available(*, deprecated, renamed: "TelemetryDeck.initialize(config:)", message: "This call was renamed to `TelemetryDeck.initialize(config:)`. Please migrate – a fix-it is available.") public static func initialize(with configuration: TelemetryManagerConfiguration) { initializedTelemetryManager = TelemetryManager(configuration: configuration) } diff --git a/Sources/TelemetryClient/TelemetryDeck.swift b/Sources/TelemetryClient/TelemetryDeck.swift index 4fd5ed2..52e6831 100644 --- a/Sources/TelemetryClient/TelemetryDeck.swift +++ b/Sources/TelemetryClient/TelemetryDeck.swift @@ -3,7 +3,7 @@ import Foundation /// A namespace for TelemetryDeck related functionalities. public enum TelemetryDeck { /// This alias makes it easier to migrate the configuration type into the TelemetryDeck namespace in future versions when deprecated code is fully removed. - public typealias Configuration = TelemetryManagerConfiguration + public typealias Config = TelemetryManagerConfiguration /// Initializes TelemetryDeck with a customizable configuration. /// @@ -11,8 +11,8 @@ public enum TelemetryDeck { /// /// This function sets up the telemetry system with the specified configuration. It is necessary to call this method before sending any telemetry signals. /// For example, you might want to call this in your `init` method of your app's `@main` entry point. - public static func initialize(configuration: Configuration) { - TelemetryManager.initialize(with: configuration) + public static func initialize(config: Config) { + TelemetryManager.initialize(with: config) } /// Sends a telemetry signal with optional parameters to TelemetryDeck.