Interstitial Ad Options
Ad Request Timeout (default: 60 seconds) [Per-loader setting]
If no ad response is received within the specified time (in seconds) after an ad request, the existing request is invalidated and the GFPInterstitialAdManagerDelegate interstitialAdManager:didFailWithError:responseInfo: method is called.
Use this when you want to configure different timeouts per loader.
- Swift
- Objective-C
self.adManager?.requestTimeoutInterval = ...
self.adManager.requestTimeoutInterval = ...
Ad Request Timeout (default: 60 seconds) [SDK-wide setting]
If no ad response is received within the specified time (in seconds) after an ad request, the existing request is invalidated and the GFPInterstitialAdManagerDelegate interstitialAdManager:didFailWithError:responseInfo: method is called.
Use this when you want to change the default value that is applied when a loader is created.
- Swift
- Objective-C
GFPAdManager.adConfiguration().interstitialAdRequestTimeout = ...
[GFPAdManager adConfiguration].interstitialAdRequestTimeout = ...
OMSDK FriendlyObstruction Configuration
If a separate view such as an overlay UI is placed on top of the ad, you can register that view as an OMSDK FriendlyObstruction. Registered views are excluded from OMSDK ad viewability measurement.
Create a GFPOMFriendlyObstruction using the initializer below.
| Parameter | Type | Description |
|---|---|---|
view | UIView | The view to register as a FriendlyObstruction |
purpose | GFPFriendlyObstructionType | The purpose of the view (see table below) |
reason | String | A string describing the reason for registration |
GFPFriendlyObstructionType enum values
| Value | Description |
|---|---|
GFPFriendlyObstructionTypeMediaControls | Media playback control UI |
GFPFriendlyObstructionTypeCloseAd | Ad close button |
GFPFriendlyObstructionTypeNotVisible | A view not visible on screen |
GFPFriendlyObstructionTypeOther | Other miscellaneous purposes |
- Swift
- Objective-C
let obstruction = GFPOMFriendlyObstruction(
with: overlayView,
purpose: .closeAd,
reason: "close button"
)
self.adManager?.omFriendlyObstructions = [obstruction]
GFPOMFriendlyObstruction *obstruction = [[GFPOMFriendlyObstruction alloc]
initWith:overlayView
purpose:GFPFriendlyObstructionTypeCloseAd
reason:@"close button"];
self.adManager.omFriendlyObstructions = @[obstruction];