Skip to content

Commit

Permalink
Mobile SDK multiformat feature (prebid#4476)
Browse files Browse the repository at this point in the history
* Update iOS documentation.

* iOS documentation corrections.

* Update Android documentation.

* Android corrections.

* iOS corrections.

* Android ad unit formats renaming.

* iOS AdFormat case renaming

* doc: corrections for iOS

* doc: corrections for Android

---------

Co-authored-by: Olena Stepaniuk <olena.stepaniuk@postindustria.com>
Co-authored-by: Yuriy Velichko <yuriy.velichko@postindustria.com>
  • Loading branch information
3 people authored and myDisconnect committed May 23, 2023
1 parent 2e43217 commit 83886b0
Show file tree
Hide file tree
Showing 11 changed files with 472 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ The code sample:
adUnit = MediationInterstitialAdUnit(
activity,
configId,
EnumSet.of(AdUnitFormat.DISPLAY),
EnumSet.of(AdUnitFormat.BANNER),
mediationUtils
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ val mediationUtils = AdMobInterstitialMediationUtils(extras)
adUnit = MediationInterstitialAdUnit(
activity,
configId,
AdUnitFormat.DISPLAY,
AdUnitFormat.BANNER,
mediationUtils
)

Expand Down Expand Up @@ -183,7 +183,7 @@ The **default** ad format for interstitial is **DISPLAY**. In order to make a `m
adUnit = MediationInterstitialAdUnit(
activity,
configId,
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO),
EnumSet.of(AdUnitFormat.BANNER, AdUnitFormat.VIDEO),
mediationUtils
)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ The **default** ad format for an interstitial ad is **DISPLAY**. In order to mak
interstitialAdUnit = InterstitialAdUnit(
requireContext(),
configId,
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO),
EnumSet.of(AdUnitFormat.BANNER, AdUnitFormat.VIDEO),
eventHandler)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ val mediationUtils = MaxMediationInterstitialUtils(maxInterstitialAd)
adUnit = MediationInterstitialAdUnit(
activity,
configId,
EnumSet.of(AdUnitFormat.DISPLAY),
EnumSet.of(AdUnitFormat.BANNER),
mediationUtils
)

Expand All @@ -140,7 +140,7 @@ The **default** ad format for interstitial is **DISPLAY**. In order to make a `m
adUnit = MediationInterstitialAdUnit(
activity,
configId,
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO),
EnumSet.of(AdUnitFormat.BANNER, AdUnitFormat.VIDEO),
mediationUtils
)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The **default** ad format for interstitial is **DISPLAY**. In order to make a `m
interstitialAdUnit = InterstitialAdUnit(
requireContext(),
configId,
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO))
EnumSet.of(AdUnitFormat.BANNER, AdUnitFormat.VIDEO))
```

#### Step 1: Create an Ad Unit
Expand Down
10 changes: 5 additions & 5 deletions prebid-mobile/modules/rendering/ios-sdk-integration-admob.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ GADInterstitialAd.load(withAdUnitID: adUnitID, request: self?.gadRequest) { [wea
})
```

The **default** ad format for interstitial is **.display**. In order to make a `multiformat bid request`, set the respective values into the `adFormats` property.
The **default** ad format for interstitial is **.banner**. In order to make a `multiformat bid request`, set the respective values into the `adFormats` property.

``` swift
// Make bid request for video ad
adUnit?.adFormats = [.video]

// Make bid request for both video amd disply ads
adUnit?.adFormats = [.video, .display]
// Make bid request for both video amd banner ads
adUnit?.adFormats = [.video, .banner]

// Make bid request for disply ad (default behaviour)
adUnit?.adFormats = [.display]
// Make bid request for banner ad (default behaviour)
adUnit?.adFormats = [.banner]

```

Expand Down
8 changes: 4 additions & 4 deletions prebid-mobile/modules/rendering/ios-sdk-integration-gam.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,17 @@ if interstitial.isReady {

```

The **default** ad format for interstitial is **.display**. In order to make a `multiformat bid request`, set the respective values in the `adFormats` property.
The **default** ad format for interstitial is **.banner**. In order to make a `multiformat bid request`, set the respective values in the `adFormats` property.

``` swift
// Make bid request for video ad
adUnit?.adFormats = [.video]

// Make bid request for both video amd disply ads
adUnit?.adFormats = [.video, .display]
adUnit?.adFormats = [.video, .banner]

// Make bid request for disply ad (default behaviour)
adUnit?.adFormats = [.display]
// Make bid request for banner ad (default behaviour)
adUnit?.adFormats = [.banner]

```

Expand Down
10 changes: 5 additions & 5 deletions prebid-mobile/modules/rendering/ios-sdk-integration-max.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,17 @@ adUnit?.fetchDemand { [weak self] result in
})
```

The **default** ad format for interstitial is **.display**. In order to make a `multiformat bid request` set the respective values in the `adFormats` property.
The **default** ad format for interstitial is **.banner**. In order to make a `multiformat bid request` set the respective values in the `adFormats` property.

``` swift
// Make bid request for video ad
adUnit?.adFormats = [.video]

// Make bid request for both video amd disply ads
adUnit?.adFormats = [.video, .display]
// Make bid request for both video amd banner ads
adUnit?.adFormats = [.video, .banner]

// Make bid request for disply ad (default behaviour)
adUnit?.adFormats = [.display]
// Make bid request for banner ad (default behaviour)
adUnit?.adFormats = [.banner]

```

Expand Down
14 changes: 7 additions & 7 deletions prebid-mobile/modules/rendering/ios-sdk-integration-pb.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ if interstitial.isReady {

```

The **default** ad format for interstitial is **.display**. In order to make a `multiformat bid request`, set the respective values into the `adFormats` property.
The **default** ad format for interstitial is **.banner**. In order to make a `multiformat bid request`, set the respective values into the `adFormats` property.

``` swift
// Make bid request for video ad
adUnit?.adFormats = [.video]

// Make bid request for both video amd disply ads
adUnit?.adFormats = [.video, .display]
// Make bid request for both video and banner ads
adUnit?.adFormats = [.video, .banner]

// Make bid request for disply ad (default behaviour)
adUnit?.adFormats = [.display]
// Make bid request for banner ad (default behaviour)
adUnit?.adFormats = [.banner]

```

Expand All @@ -161,7 +161,7 @@ Initialize the Interstitial Ad Unit with properties:
- `configID` - an ID of Stored Impression on the Prebid Server
- `minSizePercentage` - specifies the minimum width and height percent an ad may occupy of a device’s real estate.

> **NOTE:** minSizePercentage - plays an important role in a bidding process for display ads. If provided space is not enough demand partners won't respond with the bids.
> **NOTE:** minSizePercentage - plays an important role in a bidding process for banner ads. If provided space is not enough demand partners won't respond with the bids.
#### Step 2: Load the Ad
{:.no_toc}
Expand Down Expand Up @@ -225,4 +225,4 @@ Wait until the ad will be loaded and present it to the user in any suitable time
func rewardedAdDidReceiveAd(_ rewardedAd: RewardedAdUnit) {
// Now the ad is ready for display
}
```
```
Loading

0 comments on commit 83886b0

Please sign in to comment.