Rewarded Ad Options
Ad Request Timeout (default: 60 seconds) [Per-Loader Setting]
If no ad response is received within the specified time (in seconds) after the ad request, the existing request is invalidated and the GFPRewardedAdManagerDelegate rewardedAdManager:didFailWithError:responseInfo: method is called.
Use this when you want to configure a different timeout for each 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 the ad request, the existing request is invalidated and the GFPRewardedAdManagerDelegate rewardedAdManager: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().rewardedAdRequestTimeout = ...
[GFPAdManager adConfiguration].rewardedAdRequestTimeout = ...
OMSDK FriendlyObstruction Configuration
Register overlay UI views and other views displayed on top of the ad as OMSDK friendlyObstructions. Registered views are excluded from OMSDK ad viewability measurements.
When creating a GFPOMFriendlyObstruction, specify the target view (view), purpose (purpose), and reason (reason).
GFPFriendlyObstructionType | Description |
|---|---|
GFPFriendlyObstructionTypeMediaControls | Media control UI |
GFPFriendlyObstructionTypeCloseAd | Ad close button |
GFPFriendlyObstructionTypeNotVisible | View not visible on screen |
GFPFriendlyObstructionTypeOther | Other |
- Swift
- Objective-C
let obstruction = GFPOMFriendlyObstruction(
with: overlayView,
purpose: .other,
reason: "overlay UI"
)
self.adManager?.omFriendlyObstructions = [obstruction]
GFPOMFriendlyObstruction *obstruction =
[[GFPOMFriendlyObstruction alloc] initWith:overlayView
purpose:GFPFriendlyObstructionTypeOther
reason:@"overlay UI"];
self.adManager.omFriendlyObstructions = @[obstruction];
S2S Player Mute
This option is an S2S ads only API. It does not work for non-S2S ads.
Controls the mute state of the S2S ad player. This can be set at any time before or after the ad is loaded.
- Swift
- Objective-C
// Set mute
self.adManager?.setS2SPlayerMute(true)
// Check mute state
let isMuted = self.adManager?.isS2SPlayerMuted ?? false
// 음소거 설정
[self.adManager setS2SPlayerMute:YES];
// 음소거 여부 확인
BOOL isMuted = [self.adManager isS2SPlayerMuted];
Force Close S2S Ad
This option is an S2S ads only API. It does not work for non-S2S ads.
Use this to forcibly close the ad screen in situations such as server verification failure. For how to use this with retry logic, refer to S2S Rewarded Callbacks.
- Swift
- Objective-C
self.adManager?.close()
[self.adManager close];