-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from TelemetryDeck/feature/fix-warnings
Fix all deprecation warnings & restructure targets making TelemetryDeck main one
- Loading branch information
Showing
26 changed files
with
142 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This file ensures there's a target named `TelemetryClient` so `import TelemetryClient` is enough even after renaming the library to `TelemetryDeck`. | ||
@_exported import TelemetryDeck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import TelemetryDeck | ||
import Foundation | ||
|
||
@objc(TelemetryManagerConfiguration) | ||
public final class TelemetryManagerConfigurationObjCProxy: NSObject { | ||
fileprivate var telemetryDeckConfiguration: TelemetryDeck.Config | ||
|
||
@objc public init(appID: String, salt: String, baseURL: URL) { | ||
telemetryDeckConfiguration = TelemetryDeck.Config(appID: appID, salt: salt, baseURL: baseURL) | ||
} | ||
|
||
@objc public init(appID: String, baseURL: URL) { | ||
telemetryDeckConfiguration = TelemetryDeck.Config(appID: appID, baseURL: baseURL) | ||
} | ||
|
||
@objc public init(appID: String, salt: String) { | ||
telemetryDeckConfiguration = TelemetryDeck.Config(appID: appID, salt: salt) | ||
} | ||
|
||
@objc public init(appID: String) { | ||
telemetryDeckConfiguration = TelemetryDeck.Config(appID: appID) | ||
} | ||
|
||
@objc public var sendNewSessionBeganSignal: Bool { | ||
get { | ||
telemetryDeckConfiguration.sendNewSessionBeganSignal | ||
} | ||
|
||
set { | ||
telemetryDeckConfiguration.sendNewSessionBeganSignal = newValue | ||
} | ||
} | ||
|
||
@objc public var testMode: Bool { | ||
get { | ||
telemetryDeckConfiguration.testMode | ||
} | ||
|
||
set { | ||
telemetryDeckConfiguration.testMode = newValue | ||
} | ||
} | ||
|
||
@objc public var analyticsDisabled: Bool { | ||
get { | ||
telemetryDeckConfiguration.analyticsDisabled | ||
} | ||
|
||
set { | ||
telemetryDeckConfiguration.analyticsDisabled = newValue | ||
} | ||
} | ||
} | ||
|
||
@objc(TelemetryManager) | ||
public final class TelemetryManagerObjCProxy: NSObject { | ||
@objc public static func initialize(with configuration: TelemetryManagerConfigurationObjCProxy) { | ||
TelemetryDeck.initialize(config: configuration.telemetryDeckConfiguration) | ||
} | ||
|
||
@objc public static func terminate() { | ||
TelemetryDeck.terminate() | ||
} | ||
|
||
@objc public static func send(_ signalName: String, for clientUser: String? = nil, with additionalPayload: [String: String] = [:]) { | ||
TelemetryDeck.signal(signalName, parameters: additionalPayload, customUserID: clientUser) | ||
} | ||
|
||
@objc public static func send(_ signalName: String, with additionalPayload: [String: String] = [:]) { | ||
TelemetryDeck.signal(signalName, parameters: additionalPayload) | ||
} | ||
|
||
@objc public static func send(_ signalName: String) { | ||
TelemetryDeck.signal(signalName) | ||
} | ||
|
||
@objc public static func updateDefaultUser(to newDefaultUser: String?) { | ||
TelemetryDeck.updateDefaultUserID(to: newDefaultUser) | ||
} | ||
|
||
@objc public static func generateNewSession() { | ||
TelemetryDeck.generateNewSession() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.