From 70802453a243b130fb55a779c2ad6f98ca3ddd1f Mon Sep 17 00:00:00 2001 From: Pablo Matias Gomez Date: Thu, 5 Dec 2024 17:50:37 -0300 Subject: [PATCH] Change sdk enabled logic to mimic android and backend --- .../EmbraceConfigurable/RemoteConfig.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/EmbraceConfigInternal/EmbraceConfigurable/RemoteConfig.swift b/Sources/EmbraceConfigInternal/EmbraceConfigurable/RemoteConfig.swift index 589e188c..e42935c7 100644 --- a/Sources/EmbraceConfigInternal/EmbraceConfigurable/RemoteConfig.swift +++ b/Sources/EmbraceConfigInternal/EmbraceConfigurable/RemoteConfig.swift @@ -89,6 +89,9 @@ extension RemoteConfig: EmbraceConfigurable { extension RemoteConfig { func isEnabled(threshold: Float) -> Bool { + if (threshold <= 0 || threshold > 100) { + return false + } return Self.isEnabled(hexValue: deviceIdHexValue, digits: Self.deviceIdUsedDigits, threshold: threshold) }