Skip to content

Commit

Permalink
Fix Swift dictionary init (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolefrancois authored Sep 5, 2024
1 parent 0ee2688 commit 9b6b418
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import TRIKOT_FRAMEWORK_NAME

public class FirebaseAnalyticsService: AnalyticsService {
public var name: String = "FirebaseAnalytics"
private var superProperties = [String: Any]()
private var superProperties: [String: Any] = [:]

public init(enableAnalytics: Bool = true) {
isEnabled = enableAnalytics
Expand Down Expand Up @@ -42,7 +42,7 @@ public class FirebaseAnalyticsService: AnalyticsService {
}

public func trackEvent(event: AnalyticsEvent, properties: [String: Any]) {
var allProperties = [String: Any]()
var allProperties: [String: Any] = [:]
properties.forEach { allProperties[$0.key] = $0.value }
superProperties.forEach { allProperties[$0.key] = $0.value }
Analytics.logEvent(event.name, parameters: allProperties)
Expand Down

0 comments on commit 9b6b418

Please sign in to comment.