Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1001 remove or deprecate ios buyeruid and android setbuyerid #1045

Open
wants to merge 2 commits into
base: 3.0.0-official-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions InternalTestApp/InternalTestApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
34FC0CF624ADD5640045553E /* PrebidGAMRewardedController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FC0CF524ADD5640045553E /* PrebidGAMRewardedController.swift */; };
3C28C9D82C35713B00D0A7DB /* CustomRendererInterstitialController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C28C9D72C35713B00D0A7DB /* CustomRendererInterstitialController.swift */; };
3C28C9D92C35713B00D0A7DB /* CustomRendererInterstitialController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C28C9D72C35713B00D0A7DB /* CustomRendererInterstitialController.swift */; };
3C28C9DB2C357E3500D0A7DB /* SampleCustomRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C28C9DA2C357E3500D0A7DB /* SampleCustomRenderer.swift */; };
3C28C9DC2C357E3500D0A7DB /* SampleCustomRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C28C9DA2C357E3500D0A7DB /* SampleCustomRenderer.swift */; };
3CC4A3E92C11F96800B97128 /* CustomRendererBannerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC4A3E82C11F96800B97128 /* CustomRendererBannerController.swift */; };
3CC4A3EA2C11F96800B97128 /* CustomRendererBannerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC4A3E82C11F96800B97128 /* CustomRendererBannerController.swift */; };
457FD34BA45C3840CC31A8F5 /* Pods_InternalTestApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C11D97034E668BBFDD0DDCA /* Pods_InternalTestApp.framework */; };
Expand Down Expand Up @@ -381,7 +379,6 @@
35F94D131F93F85D00CF46DB /* InternalTestAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InternalTestAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
35F94D171F93F85D00CF46DB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3C28C9D72C35713B00D0A7DB /* CustomRendererInterstitialController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomRendererInterstitialController.swift; sourceTree = "<group>"; };
3C28C9DA2C357E3500D0A7DB /* SampleCustomRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleCustomRenderer.swift; sourceTree = "<group>"; };
3CC4A3E82C11F96800B97128 /* CustomRendererBannerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomRendererBannerController.swift; sourceTree = "<group>"; };
530E722B292FACB20025B44D /* UIImageView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Extensions.swift"; sourceTree = "<group>"; };
5397BD132936185400ABDA22 /* PrebidOriginalAPIDisplayBannerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrebidOriginalAPIDisplayBannerController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -847,7 +844,6 @@
34B10A2F255017DE00B5FE09 /* ThreadCheckingButton.swift */,
34C25816255D69E1000A4A73 /* EventReportContainer.swift */,
530E722B292FACB20025B44D /* UIImageView+Extensions.swift */,
3C28C9DA2C357E3500D0A7DB /* SampleCustomRenderer.swift */,
);
path = Utilities;
sourceTree = "<group>";
Expand Down Expand Up @@ -1577,7 +1573,6 @@
53ED2FE829798104007D13EE /* PrebidBannerController.swift in Sources */,
53ED2FE929798104007D13EE /* PrebidBannerConfigurationController.swift in Sources */,
53ED2FEA29798104007D13EE /* TestCase.swift in Sources */,
3C28C9DC2C357E3500D0A7DB /* SampleCustomRenderer.swift in Sources */,
53ED2FEB29798104007D13EE /* PrebidAdMobNativeViewController.swift in Sources */,
53ED2FEC29798104007D13EE /* PrebidInterstitialController.swift in Sources */,
53ED2FED29798104007D13EE /* PrebidOriginalAPIDisplayInterstitialController.swift in Sources */,
Expand Down Expand Up @@ -1674,7 +1669,6 @@
3493022224740BEE004A6086 /* PrebidBannerController.swift in Sources */,
5BDB85DA2739794900A529F6 /* PrebidBannerConfigurationController.swift in Sources */,
5B3EEDE52101FB8800BAA0C4 /* TestCase.swift in Sources */,
3C28C9DB2C357E3500D0A7DB /* SampleCustomRenderer.swift in Sources */,
92C475122796FF8400C26E27 /* PrebidAdMobNativeViewController.swift in Sources */,
34FC0CF424ADD3A80045553E /* PrebidInterstitialController.swift in Sources */,
5397BD26293760F500ABDA22 /* PrebidOriginalAPIDisplayInterstitialController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ struct TestCaseManager {
targeting.userGender = TestCaseManager.strToGender(value)
}

if let value = openRtb["buyerid"] as? String {
targeting.buyerUID = value
}
if let value = openRtb["xid"] as? String {
targeting.userID = value
}
Expand Down

This file was deleted.

4 changes: 4 additions & 0 deletions PrebidMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@
A908694629E05F7900B37479 /* PrebidRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A908694529E05F7900B37479 /* PrebidRenderer.swift */; };
A9750D7A2ABB9A300066E4E6 /* PluginEventListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9750D792ABB9A300066E4E6 /* PluginEventListener.swift */; };
A9A3396B2AC57193006AD0E7 /* PBMAdViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A3396A2AC57193006AD0E7 /* PBMAdViewDelegate.swift */; };
F95DA2072C87567D0068A2BB /* SampleCustomRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95DA2062C87567D0068A2BB /* SampleCustomRenderer.swift */; };
FA5AD5E42271FA4100C8F274 /* ConstantsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5AD5E32271FA4100C8F274 /* ConstantsTest.swift */; };
FA9D7F2722E8A83D006FCBEF /* AdViewUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9D7F2622E8A83D006FCBEF /* AdViewUtilsTests.swift */; };
FAA29904242D1C27002ACBF2 /* TargetingObjCTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FAA29903242D1C27002ACBF2 /* TargetingObjCTests.m */; };
Expand Down Expand Up @@ -1672,6 +1673,7 @@
A908694529E05F7900B37479 /* PrebidRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrebidRenderer.swift; sourceTree = "<group>"; };
A9750D792ABB9A300066E4E6 /* PluginEventListener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginEventListener.swift; sourceTree = "<group>"; };
A9A3396A2AC57193006AD0E7 /* PBMAdViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PBMAdViewDelegate.swift; sourceTree = "<group>"; };
F95DA2062C87567D0068A2BB /* SampleCustomRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SampleCustomRenderer.swift; sourceTree = "<group>"; };
FA4A88432497A99D00FDCBB6 /* Swizzling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Swizzling.swift; sourceTree = "<group>"; };
FA5AD5E32271FA4100C8F274 /* ConstantsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsTest.swift; sourceTree = "<group>"; };
FA85F9B4264946FC00B8BE72 /* TestUtils.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TestUtils.xcodeproj; path = ../tools/TestUtils/TestUtils.xcodeproj; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3184,6 +3186,7 @@
A908694029E05E8D00B37479 /* PluginRenderer */ = {
isa = PBXGroup;
children = (
F95DA2062C87567D0068A2BB /* SampleCustomRenderer.swift */,
A908694129E05EAF00B37479 /* PrebidMobilePluginRegister.swift */,
A908694329E05ED500B37479 /* PrebidMobilePluginRenderer.swift */,
A9750D792ABB9A300066E4E6 /* PluginEventListener.swift */,
Expand Down Expand Up @@ -4154,6 +4157,7 @@
537B6518283372FD008AE9D1 /* PathBuilder.swift in Sources */,
FAEE4D1A262DC2B200AD9966 /* NativeAd.swift in Sources */,
5BC37A1B271F1D0000444D5E /* Prebid.swift in Sources */,
F95DA2072C87567D0068A2BB /* SampleCustomRenderer.swift in Sources */,
5BC379A8271F1D0000444D5E /* PBMModalViewController.m in Sources */,
5BC37AC3271F1D0100444D5E /* PBMURLComponents.m in Sources */,
5BC378D3271F1CFF00444D5E /* PBMORTBAbstract.m in Sources */,
Expand Down
5 changes: 0 additions & 5 deletions PrebidMobile/ConfigurationAndTargeting/Targeting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ public class Targeting: NSObject {
set { parameterDictionary[PrebidTargetingKey_USER_ID] = newValue }
}

/**
Buyer-specific ID for the user as mapped by the exchange for the buyer.
*/
public var buyerUID: String?

/**
Optional feature to pass bidder data that was set in the
exchange’s cookie. The string must be in base85 cookie safe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ + (nonnull PBMORTBBidRequest *)createORTBBidRequestWithTargeting:(nonnull Target
}

bidRequest.user.gender = targeting.userGenderDescription;
bidRequest.user.buyeruid = targeting.buyerUID;
bidRequest.user.customdata = targeting.userCustomData;
bidRequest.user.userid = targeting.userID;

Expand Down
2 changes: 0 additions & 2 deletions PrebidMobile/PrebidMobileRendering/ORTB/PBMORTBUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ NS_ASSUME_NONNULL_BEGIN
//id not supported


//Buyer-specific ID for the user as mapped by the exchange for the buyer. At least one of buyerid or id is recommended.
@property (nonatomic, copy, nullable) NSString *buyeruid;

//Year of birth as a 4-digit integer
@property (nonatomic, strong, nullable) NSNumber *yob;
Expand Down
2 changes: 0 additions & 2 deletions PrebidMobile/PrebidMobileRendering/ORTB/PBMORTBUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ - (nonnull PBMJsonDictionary *)toJsonDictionary {

ret[@"yob"] = self.yob;
ret[@"gender"] = self.gender;
ret[@"buyeruid"] = self.buyeruid;
ret[@"keywords"] = self.keywords;
ret[@"customdata"] = self.customdata;
ret[@"id"] = self.userid;
Expand Down Expand Up @@ -69,7 +68,6 @@ - (instancetype)initWithJsonDictionary:(nonnull PBMJsonDictionary *)jsonDictiona
}
_yob = jsonDictionary[@"yob"];
_gender = jsonDictionary[@"gender"];
_buyeruid = jsonDictionary[@"buyeruid"];
_keywords = jsonDictionary[@"keywords"];
_customdata = jsonDictionary[@"customdata"];
_ext = jsonDictionary[@"ext"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 */

import Foundation
import PrebidMobile
import UIKit

public class SampleCustomRenderer: NSObject, PrebidMobilePluginRenderer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ParameterBuilderServiceTest : XCTestCase {
targeting.parameterDictionary["foo"] = "bar"
targeting.coppa = 1
targeting.userGender = .male
targeting.buyerUID = "buyerUID"
targeting.storeURL = url
targeting.userCustomData = "customDataString"
targeting.publisherName = publisherName
Expand Down Expand Up @@ -155,7 +154,7 @@ class ParameterBuilderServiceTest : XCTestCase {
}

let expectedOrtb = """
{\"app\":{\"bundle\":\"Mock.Bundle.Identifier\",\"keywords\":\"appKeyword1,appKeyword2\",\"name\":\"MockBundleDisplayName\",\"publisher\":{\"name\":\"Publisher\"},\"storeurl\":\"https:\\/\\/openx.com\"},\"device\":{\(carrier)\"connectiontype\":2,\(deviceExt)\"geo\":{\"lat\":34.149335,\"lon\":-118.1328249,\"type\":1},\"h\":200,\"hwv\":\"iPhone1,1\",\"ifa\":\"abc123\",\"language\":\"ml\",\"lmt\":0,\"make\":\"MockMake\",\(mccmnc)\"model\":\"MockModel\",\"os\":\"MockOS\",\"osv\":\"1.2.3\",\"w\":100},\"imp\":[{\"clickbrowser\":1,\"displaymanager\":\"prebid-mobile\",\"displaymanagerver\":\"MOCK_SDK_VERSION\",\"ext\":{\"dlp\":1},\"instl\":0,\"secure\":1}],\"regs\":{\"coppa\":1,\"ext\":{\"gdpr\":0}},\"user\":{\"buyeruid\":\"buyerUID\",\"customdata\":\"customDataString\",\"ext\":{\"consent\":\"consentstring\"},\"gender\":\"M\",\"id\":\"userID\",\"keywords\":\"keyword1,keyword2\"}}
{\"app\":{\"bundle\":\"Mock.Bundle.Identifier\",\"keywords\":\"appKeyword1,appKeyword2\",\"name\":\"MockBundleDisplayName\",\"publisher\":{\"name\":\"Publisher\"},\"storeurl\":\"https:\\/\\/openx.com\"},\"device\":{\(carrier)\"connectiontype\":2,\(deviceExt)\"geo\":{\"lat\":34.149335,\"lon\":-118.1328249,\"type\":1},\"h\":200,\"hwv\":\"iPhone1,1\",\"ifa\":\"abc123\",\"language\":\"ml\",\"lmt\":0,\"make\":\"MockMake\",\(mccmnc)\"model\":\"MockModel\",\"os\":\"MockOS\",\"osv\":\"1.2.3\",\"w\":100},\"imp\":[{\"clickbrowser\":1,\"displaymanager\":\"prebid-mobile\",\"displaymanagerver\":\"MOCK_SDK_VERSION\",\"ext\":{\"dlp\":1},\"instl\":0,\"secure\":1}],\"regs\":{\"coppa\":1,\"ext\":{\"gdpr\":0}},\"user\":{\"customdata\":\"customDataString\",\"ext\":{\"consent\":\"consentstring\"},\"gender\":\"M\",\"id\":\"userID\",\"keywords\":\"keyword1,keyword2\"}}
"""
PBMAssertEq(strORTB, expectedOrtb)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ typealias JsonDictionary = [String:Any]

targeting.userGender = .unknown
targeting.userID = nil
targeting.buyerUID = nil
targeting.publisherName = nil
targeting.storeURL = nil
targeting.userCustomData = nil
Expand Down Expand Up @@ -324,7 +323,6 @@ typealias JsonDictionary = [String:Any]
@objc public class func checkInitialValues(_ targeting: Targeting) {
XCTAssertEqual(targeting.userGender, .unknown)
XCTAssertNil(targeting.userID)
XCTAssertNil(targeting.buyerUID)
XCTAssertNil(targeting.publisherName)
XCTAssertNil(targeting.storeURL)
XCTAssertNil(targeting.userCustomData)
Expand Down
18 changes: 0 additions & 18 deletions PrebidMobileTests/TargetingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -870,24 +870,6 @@ class TargetingTests: XCTestCase {
XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)")
}

func testBuyerUID() {
//Init
//Note: on init, and it never sends a value via an odinary ad request params.
let Targeting = Targeting.shared
XCTAssertNil(Targeting.buyerUID)
XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)")

//Set
let buyerUID = "abc123"
Targeting.buyerUID = buyerUID
XCTAssertEqual(Targeting.buyerUID, buyerUID)
XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)")

//Unset
Targeting.buyerUID = nil
XCTAssert(Targeting.parameterDictionary == [:], "Dict is \(Targeting.parameterDictionary)")
}

func testUserCustomData() {

//Init
Expand Down
Loading