CryptoSDK phased rollout feature

This commit is contained in:
Andy Uhnak
2023-02-14 17:03:25 +00:00
parent 292ea0c347
commit 81cdb68ce4
21 changed files with 463 additions and 84 deletions
@@ -25,6 +25,8 @@ class PostHogAnalyticsClient: AnalyticsClientProtocol {
/// Any user properties to be included with the next captured event.
private(set) var pendingUserProperties: AnalyticsEvent.UserProperties?
static let shared = PostHogAnalyticsClient()
var isRunning: Bool { postHog?.enabled ?? false }
func start() {
@@ -102,3 +104,9 @@ class PostHogAnalyticsClient: AnalyticsClientProtocol {
return properties
}
}
extension PostHogAnalyticsClient: RemoteFeaturesClientProtocol {
func isFeatureEnabled(_ feature: String) -> Bool {
postHog?.isFeatureEnabled(feature) == true
}
}