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
useDefaultUABoolfalseUse the SDK's built-in default User-Agent for ad requests
externalUserAgentStringUser-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

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