diff --git a/Sources/MapboxMaps/Foundation/Events/EventsManager.swift b/Sources/MapboxMaps/Foundation/Events/EventsManager.swift index 1f29367e8a74..5a98b83a6a37 100644 --- a/Sources/MapboxMaps/Foundation/Events/EventsManager.swift +++ b/Sources/MapboxMaps/Foundation/Events/EventsManager.swift @@ -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 }