From 5c3a9c1c84acb74726ca6d975e0fb3dfd854deca Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Thu, 29 Aug 2024 07:03:01 -0500 Subject: [PATCH] Remove customParam adding. --- .../ConfigurationAndTargeting/Targeting.swift | 21 -------------- PrebidMobileTests/TargetingTests.swift | 29 ------------------- 2 files changed, 50 deletions(-) diff --git a/PrebidMobile/ConfigurationAndTargeting/Targeting.swift b/PrebidMobile/ConfigurationAndTargeting/Targeting.swift index 8d46e5333..7fe156390 100644 --- a/PrebidMobile/ConfigurationAndTargeting/Targeting.swift +++ b/PrebidMobile/ConfigurationAndTargeting/Targeting.swift @@ -344,27 +344,6 @@ public class Targeting: NSObject { } } - public func setCustomParams(_ params: [String : String]?) { - guard let params = params else { - return - } - - params.keys.forEach { key in - if let value = params[key] { - addCustomParam(value, withName: key) - } - } - } - - public func addCustomParam(_ value: String, withName: String?) { - guard let name = withName else { - return - } - - let prefixedName = makeCustomParamFromName(name) - addParam(value, withName:prefixedName) - } - // Store location in the user's section public func setLatitude(_ latitude: Double, longitude: Double) { coordinate = NSValue(mkCoordinate: CLLocationCoordinate2DMake(latitude, longitude)) diff --git a/PrebidMobileTests/TargetingTests.swift b/PrebidMobileTests/TargetingTests.swift index 01c1b6d57..cfb290e7e 100644 --- a/PrebidMobileTests/TargetingTests.swift +++ b/PrebidMobileTests/TargetingTests.swift @@ -997,35 +997,6 @@ class TargetingTests: XCTestCase { Targeting.addParam("", withName: "name") XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)") } - - func testAddCustomParam() { - - //Init - let Targeting = Targeting.shared - XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)") - - //Set - Targeting.addCustomParam("value", withName: "name") - XCTAssert(Targeting.parameterDictionary == ["c.name":"value"], "Dict is \(Targeting.parameterDictionary)") - - //Unset - Targeting.addCustomParam("", withName: "name") - XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)") - } - - func testSetCustomParams() { - //Init - let Targeting = Targeting.shared - XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)") - - //Set - Targeting.setCustomParams(["name1":"value1", "name2":"value2"]) - XCTAssert(Targeting.parameterDictionary == ["c.name1":"value1", "c.name2":"value2"], "Dict is \(Targeting.parameterDictionary)") - - //Not currently possible to unset - Targeting.setCustomParams([:]) - XCTAssert(Targeting.parameterDictionary == ["c.name1":"value1", "c.name2":"value2"], "Dict is \(Targeting.parameterDictionary)") - } func testKeywords() { //Init