Skip to content

Commit

Permalink
Fix attribution dialog initialization (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Yeshkunov authored and macdrevx committed Dec 2, 2021
1 parent eb644df commit 0eaf938
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/MapboxMaps/Foundation/Events/EventsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ internal class EventsManager: EventsListener {
hostSDKVersion: sdkVersion)
mmeEventsManager.skuId = "00"

UserDefaults.standard.register(defaults: [
#keyPath(UserDefaults.MGLMapboxMetricsEnabled): true
])

metricsEnabledObservation = UserDefaults.standard.observe(\.MGLMapboxMetricsEnabled, options: [.initial, .new]) { _, change in
DispatchQueue.main.async {
guard let newValue = change.newValue else { return }
Expand Down

0 comments on commit 0eaf938

Please sign in to comment.