Skip to main content

GFPAdConfiguration Options

GFPAdConfiguration is an object used to specify app-wide settings at SDK initialization or at runtime.
It can be accessed at any time via GFPAdManager.adConfiguration().

Prerequisites​

Options Summary​

PropertyTypeDefaultDescription
bannerAdRequestTimeoutNSTimeInterval60sBanner ad request timeout
videoAdRequestTimeoutNSTimeInterval60sVideo ad request timeout
unifiedAdRequestTimeoutNSTimeInterval60sUnified (banner + native) ad request timeout
rewardedAdRequestTimeoutNSTimeInterval60sRewarded ad request timeout
interstitialAdRequestTimeoutNSTimeInterval60sInterstitial ad request timeout
preferredLanguageGFPLanguageType.noneLanguage for ad UI components
adInterfaceStyleGFPAdInterfaceStyle.lightAd UI style (light / dark / system)
customParam[String: String]?nilGlobal custom parameters
muteAudioBooltrueMute ad audio (applies to C2S AP and S2S reward ads)
useLoudnessBoolfalseEnable Loudness Normalization for video ads
manageAudioSessionBoolfalseLet the SDK manage the audio session during outstream ad video playback
useDefaultUABoolfalseUse the SDK's built-in default User-Agent for ad requests
externalUserAgentString—User-Agent injected from outside the SDK
logLevelGFPLogLevel.noneSDK console log level
disableCrashReportBoolfalseDisable CrashReport from external DSP SDKs (e.g. DFP)
useDefaultSafariBrowserBoolfalseUse the default in-app browser for S2S ad landing
disableAdIDBoolfalseDisable IDFA collection
disableLocationInfoBoolfalseDisable location information collection
privacySettingGFPPrivacySetting?nilPrivacy settings for GDPR / CCPA / GPP
adProviderConfigList[GFPAdProviderSetting][]Test mode settings per ad provider
phaseGFPPhaseType.realAd server environment (test / production)

Timeout Settings​

Sets the request timeout in seconds for each ad type.

let config = GFPAdManager.adConfiguration()
config.bannerAdRequestTimeout = 30
config.videoAdRequestTimeout = 30
config.unifiedAdRequestTimeout = 30
config.rewardedAdRequestTimeout = 30
config.interstitialAdRequestTimeout = 30
info

Setting requestTimeoutInterval directly on each ad manager (GFPBannerView, GFPRewardedAdManager, etc.) applies an individual timeout only to that instance.


Language Settings​

Specifies the language for UI components of ads served via S2S.
When set to none, rendering is based on the device language; if the language is not supported, English is used.

Supported languages: Korean (ko), English (en), Thai (th), French (fr), Spanish (es), Indonesian (id), Traditional Chinese (zh_Hant), Simplified Chinese (zh_Hans), Japanese (ja), German (de)

GFPAdManager.adConfiguration().preferredLanguage = .ko
info

This must be set before loading an ad. If changed after loading, the language of already-loaded ads will not change — you must reload the ad after changing the language.


UI Style​

Sets the style of ad UI components (such as the Admute icon).

ValueDescription
.lightLight mode (default)
.darkDark mode
.systemFollows the device system setting
GFPAdManager.adConfiguration().adInterfaceStyle = .light
GFPAdManager.adConfiguration().adInterfaceStyle = .dark
GFPAdManager.adConfiguration().adInterfaceStyle = .system

Global CustomParam Settings​

Sets custom parameters to be applied globally to all ad placements. Both keys and values must be strings.

When a key conflicts with GFPAdParam.customUserParam, the priority is as follows:

GFPAdParam.customUserParam > GFPAdConfiguration.customParam

GFPAdManager.adConfiguration().customParam = ["key1": "value1", "key2": "value2"]

Mute / Volume​

Ad Audio Mute​

Sets whether to mute audio for C2S ads and S2S rewarded ads (excludes instream and outstream).

GFPAdManager.adConfiguration().muteAudio = true // 기본값
GFPAdManager.adConfiguration().muteAudio = false

Loudness (Automatic Volume Adjustment)​

Sets whether to use Loudness Normalization during video ad playback.

GFPAdManager.adConfiguration().useLoudness = true

Audio Session Management (since 8.27.0)​

Lets the SDK manage the AVAudioSession category while outstream ad videos (native, rich, rewarded, interstitial) are playing. (Default: false) This prevents audio from other apps (e.g. music apps) from being interrupted by muted ad video playback.

When multiple ad videos play at the same time, the SDK aggregates their playback states to decide a single category.

Playback StateAudio Session Category
All playing videos are mutedAmbient (mixes with audio from other apps)
At least one video is unmutedSoloAmbient (ad sound only, respects the silent switch)
All videos stoppedRestores the category used before management started and notifies other apps so their interrupted audio can resume
GFPAdManager.adConfiguration().manageAudioSession = true
info
  • Not applied to instream and IMA ads.
  • If your app manages the audio session itself, leave this option false and, if needed, control the audio session in the adPlayerWillPlay:isMuted: callback of GFPVideoEventDelegate.
  • If a video is unmuted and then muted again during playback, the category switches to Ambient, but audio from other apps that was already interrupted resumes only after ad video playback ends.

GFPAudioSessionManagerDelegate​

If you need to control your app's own audio (TTS, background music, etc.) while using this option, set the delegate of GFPAudioSessionManager.

MethodDescription
audioSessionManagerWillPlayAudio:Called right before an ad video plays unmuted and interrupts audio from other apps. Use it to pause your app's own audio.
audioSessionManagerDidStopPlayingAudio:Called after all ad video playback has ended and the audio session has been restored to its state before management started. Use it to resume your app's own audio.
GFPAudioSessionManager.sharedInstance.delegate = self

func audioSessionManagerWillPlayAudio(_ manager: GFPAudioSessionManager) {
// Pause your app's own audio
}

func audioSessionManagerDidStopPlayingAudio(_ manager: GFPAudioSessionManager) {
// Resume your app's own audio
}

User-Agent​

Use SDK Default UA​

Requests ads using the Default User-Agent defined within the SDK.

GFPAdManager.adConfiguration().useDefaultUA = true

Inject External User-Agent​

Injects the User-Agent used by the app's WebView into the SDK.

GFPAdManager.adConfiguration().externalUserAgent = "MyApp/1.0 ..."

Log Level​

Sets the SDK console log output level. Only logs at or above the specified level are printed.

ValueDescription
.noneNo log output (default)
.traceDetailed trace logs
.debugDebug logs
.infoInformational logs
.errorError logs
.criticalCritical error logs
GFPAdManager.adConfiguration().logLevel = .debug

Privacy / Permission Settings​

Disable IDFA Collection​

If your app's policy prohibits the use of IDFA, this disables IDFA collection regardless of the device's permission status.

GFPAdManager.adConfiguration().disableAdID = true

Disable Location Information Collection​

Prevents the SDK from using location information even if the service has obtained location permission.

GFPAdManager.adConfiguration().disableLocationInfo = true

Privacy Settings (GDPR / CCPA / GPP)​

Applies settings required by privacy regulations such as GDPR, CCPA, and GPP.

let privacy = GFPPrivacySetting(underAgeOfConsent: nil, childDirected: NSNumber(value: false))
GFPAdManager.adConfiguration().privacySetting = privacy

Other Settings​

Disable CrashReport​

Disables the CrashReport feature from external DSP SDKs (e.g. DFP).

GFPAdManager.adConfiguration().disableCrashReport = true

Use Default In-App Browser​

Uses the SDK's built-in in-app browser when landing on S2S ad destinations.

GFPAdManager.adConfiguration().useDefaultSafariBrowser = true

Ad Provider Test Mode​

Configures specific ad providers to receive test ads.

GFPAdManager.adConfiguration().adProviderConfigList = [
.type(.DFP, testMode: true),
.type(.FAN, testMode: true)
]