Skip to main content

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.

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.

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).

GFPFriendlyObstructionTypeDescription
GFPFriendlyObstructionTypeMediaControlsMedia control UI
GFPFriendlyObstructionTypeCloseAdAd close button
GFPFriendlyObstructionTypeNotVisibleView not visible on screen
GFPFriendlyObstructionTypeOtherOther
let obstruction = GFPOMFriendlyObstruction(
with: overlayView,
purpose: .other,
reason: "overlay UI"
)
self.adManager?.omFriendlyObstructions = [obstruction]

S2S Player Mute

info

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.

// Set mute
self.adManager?.setS2SPlayerMute(true)

// Check mute state
let isMuted = self.adManager?.isS2SPlayerMuted ?? false

Force Close S2S Ad

info

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.

self.adManager?.close()