Skip to content

Commit

Permalink
Merge pull request #951 from AnthonyTTaylor/fix/pbsDebugFlag
Browse files Browse the repository at this point in the history
Adding pbsDebug to bidRequest
  • Loading branch information
jsligh authored Apr 5, 2024
2 parents f1d0a9c + 4358a54 commit d71b998
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ - (void)buildBidRequest:(nonnull PBMORTBBidRequest *)bidRequest {
bidRequest.extPrebid.dataBidders = self.targeting.accessControlList;
bidRequest.extPrebid.storedBidResponses = [Prebid.shared getStoredBidResponses];
bidRequest.ortbObject = [self.adConfiguration.adConfiguration getCheckedOrtbConfig];

if (Prebid.shared.pbsDebug) {
bidRequest.test = @1;
}

if (Prebid.shared.useCacheForReportingWithRenderingAPI) {
PBMMutableJsonDictionary * const cache = [PBMMutableJsonDictionary new];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ParameterBuilderServiceTest : XCTestCase {
override func setUp() {
UtilitiesForTesting.resetTargeting(.shared)
Prebid.shared.shareGeoLocation = true
Prebid.shared.pbsDebug = true
}

override func tearDown() {
Expand Down Expand Up @@ -114,6 +115,9 @@ class ParameterBuilderServiceTest : XCTestCase {
PBMAssertEq(bidRequest.device.h!.intValue, Int(mockDeviceAccessManager.screenSize().height))
PBMAssertEq(bidRequest.device.ifa, MockDeviceAccessManager.mockAdvertisingIdentifier)
PBMAssertEq(bidRequest.device.lmt, 0)

//Verify pbsDebug
PBMAssertEq(bidRequest.test, 1)


if #available(iOS 16, *) {
Expand Down

0 comments on commit d71b998

Please sign in to comment.