Skip to content

Commit

Permalink
Shorten configuration parameter to config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed May 3, 2024
1 parent 59ea4ce commit 2350292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/TelemetryClient/TelemetryClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/TelemetryClient/TelemetryDeck.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ 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.
///
/// - Parameter configuration: An instance of `Configuration` which includes all the settings required to configure 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.
Expand Down

0 comments on commit 2350292

Please sign in to comment.