Skip to content

Commit

Permalink
feat: add adPosition to InterstitialRenderingAdUnit and RewardedAdUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
OlenaPostindustria committed Dec 5, 2024
1 parent 5597f24 commit 919ca36
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PrebidMobile/AdUnits/MultiformatAdUnit/PrebidAdUnit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public class PrebidAdUnit: NSObject {
}

adUnit.adUnitConfig.adConfiguration.isInterstitialAd = request.isInterstitial
adUnit.adUnitConfig.adConfiguration.isOptIn = request.isRewarded
adUnit.adUnitConfig.adConfiguration.isRewarded = request.isRewarded
adUnit.adUnitConfig.adPosition = request.adPosition

if request.isInterstitial || request.isRewarded {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public class InterstitialRenderingAdUnit: NSObject, BaseInterstitialAdUnitProtoc
set { adUnitConfig.adFormats = newValue }
}

/// The position of the ad on the screen.
public var adPosition: AdPosition {
get { adUnitConfig.adPosition }
set { adUnitConfig.adPosition = newValue }
}

/// The ORTB (OpenRTB) configuration string for the ad unit.
public var ortbConfig: String? {
get { adUnitConfig.ortbConfig }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public class RewardedAdUnit: NSObject, BaseInterstitialAdUnitProtocol {
set { adUnitConfig.adFormats = newValue }
}

/// The position of the ad on the screen.
public var adPosition: AdPosition {
get { adUnitConfig.adPosition }
set { adUnitConfig.adPosition = newValue }
}

/// The ORTB (OpenRTB) configuration string for the ad unit.
public var ortbConfig: String? {
get { adUnitConfig.ortbConfig }
Expand Down

0 comments on commit 919ca36

Please sign in to comment.