Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeCla committed Aug 28, 2023
1 parent 4ac3889 commit 405c8eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion ios/Nativebrik/Classes/experiment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func extractExperimentVariant(config: ExperimentConfig, normalizedUsrRnd: Double
for (index, weight) in weights.enumerated() {
let probability: Double = Double(weight) / Double(weightSum)
comulativeDistributionValue += probability
print(comulativeDistributionValue, index)

if comulativeDistributionValue >= normalizedUsrRnd {
selectedVariantIndex = index
Expand Down
4 changes: 2 additions & 2 deletions ios/Nativebrik/Classes/remote-config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation
import SwiftUI
import UIKit

public class RemoteConfigVariant: NSObject {
public class RemoteConfigVariant {
public let experimentId: String
public let variantId: String
private let configs: [VariantConfig]
Expand Down Expand Up @@ -55,7 +55,7 @@ public class RemoteConfigVariant: NSObject {
return Int(value) ?? 0
}

public func getAsDouble(_ key: String) -> Float? {
public func getAsFloat(_ key: String) -> Float? {
guard let value = self.get(key) else {
return nil
}
Expand Down

0 comments on commit 405c8eb

Please sign in to comment.