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
| Property | Type | Default | Description |
|---|---|---|---|
bannerAdRequestTimeout | NSTimeInterval | 60s | Banner ad request timeout |
videoAdRequestTimeout | NSTimeInterval | 60s | Video ad request timeout |
unifiedAdRequestTimeout | NSTimeInterval | 60s | Unified (banner + native) ad request timeout |
rewardedAdRequestTimeout | NSTimeInterval | 60s | Rewarded ad request timeout |
interstitialAdRequestTimeout | NSTimeInterval | 60s | Interstitial ad request timeout |
preferredLanguage | GFPLanguageType | .none | Language for ad UI components |
adInterfaceStyle | GFPAdInterfaceStyle | .light | Ad UI style (light / dark / system) |
customParam | [String: String]? | nil | Global custom parameters |
muteAudio | Bool | true | Mute ad audio (applies to C2S AP and S2S reward ads) |
useLoudness | Bool | false | Enable Loudness Normalization for video ads |
useDefaultUA | Bool | false | Use the SDK's built-in default User-Agent for ad requests |
externalUserAgent | String | — | User-Agent injected from outside the SDK |
logLevel | GFPLogLevel | .none | SDK console log level |
disableCrashReport | Bool | false | Disable CrashReport from external DSP SDKs (e.g. DFP) |
useDefaultSafariBrowser | Bool | false | Use the default in-app browser for S2S ad landing |
disableAdID | Bool | false | Disable IDFA collection |
disableLocationInfo | Bool | false | Disable location information collection |
privacySetting | GFPPrivacySetting? | nil | Privacy settings for GDPR / CCPA / GPP |
adProviderConfigList | [GFPAdProviderSetting] | [] | Test mode settings per ad provider |
phase | GFPPhaseType | .real | Ad server environment (test / production) |
Timeout Settings
Sets the request timeout in seconds for each ad type.
- Swift
- Objective-C
let config = GFPAdManager.adConfiguration()
config.bannerAdRequestTimeout = 30
config.videoAdRequestTimeout = 30
config.unifiedAdRequestTimeout = 30
config.rewardedAdRequestTimeout = 30
config.interstitialAdRequestTimeout = 30
GFPAdConfiguration *config = [GFPAdManager adConfiguration];
config.bannerAdRequestTimeout = 30;
config.videoAdRequestTimeout = 30;
config.unifiedAdRequestTimeout = 30;
config.rewardedAdRequestTimeout = 30;
config.interstitialAdRequestTimeout = 30;
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)
- Swift
- Objective-C
GFPAdManager.adConfiguration().preferredLanguage = .ko
[GFPAdManager adConfiguration].preferredLanguage = GFPLanguageType_ko;
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).
| Value | Description |
|---|---|
.light | Light mode (default) |
.dark | Dark mode |
.system | Follows the device system setting |
- Swift
- Objective-C
GFPAdManager.adConfiguration().adInterfaceStyle = .light
GFPAdManager.adConfiguration().adInterfaceStyle = .dark
GFPAdManager.adConfiguration().adInterfaceStyle = .system
[GFPAdManager adConfiguration].adInterfaceStyle = GFPAdInterfaceStyleLight;
[GFPAdManager adConfiguration].adInterfaceStyle = GFPAdInterfaceStyleDark;
[GFPAdManager adConfiguration].adInterfaceStyle = GFPAdInterfaceStyleSystem;
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
- Swift
- Objective-C
GFPAdManager.adConfiguration().customParam = ["key1": "value1", "key2": "value2"]
[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).
- Swift
- Objective-C
GFPAdManager.adConfiguration().muteAudio = true // 기본값
GFPAdManager.adConfiguration().muteAudio = false
[GFPAdManager adConfiguration].muteAudio = YES; // 기본값
[GFPAdManager adConfiguration].muteAudio = NO;
Loudness (Automatic Volume Adjustment)
Sets whether to use Loudness Normalization during video ad playback.
- Swift
- Objective-C
GFPAdManager.adConfiguration().useLoudness = true
[GFPAdManager adConfiguration].useLoudness = YES;
User-Agent
Use SDK Default UA
Requests ads using the Default User-Agent defined within the SDK.
- Swift
- Objective-C
GFPAdManager.adConfiguration().useDefaultUA = true
[GFPAdManager adConfiguration].useDefaultUA = YES;
Inject External User-Agent
Injects the User-Agent used by the app's WebView into the SDK.
- Swift
- Objective-C
GFPAdManager.adConfiguration().externalUserAgent = "MyApp/1.0 ..."
[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.
| Value | Description |
|---|---|
.none | No log output (default) |
.trace | Detailed trace logs |
.debug | Debug logs |
.info | Informational logs |
.error | Error logs |
.critical | Critical error logs |
- Swift
- Objective-C
GFPAdManager.adConfiguration().logLevel = .debug
[GFPAdManager adConfiguration].logLevel = GFPLogLevelDebug;
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.
- Swift
- Objective-C
GFPAdManager.adConfiguration().disableAdID = true
[GFPAdManager adConfiguration].disableAdID = YES;
Disable Location Information Collection
Prevents the SDK from using location information even if the service has obtained location permission.
- Swift
- Objective-C
GFPAdManager.adConfiguration().disableLocationInfo = true
[GFPAdManager adConfiguration].disableLocationInfo = YES;
Privacy Settings (GDPR / CCPA / GPP)
Applies settings required by privacy regulations such as GDPR, CCPA, and GPP.
- Swift
- Objective-C
let privacy = GFPPrivacySetting(underAgeOfConsent: nil, childDirected: NSNumber(value: false))
GFPAdManager.adConfiguration().privacySetting = privacy
GFPPrivacySetting *privacy = [[GFPPrivacySetting alloc] initWithUnderAgeOfConsent:nil
childDirected:@NO];
[GFPAdManager adConfiguration].privacySetting = privacy;
Other Settings
Disable CrashReport
Disables the CrashReport feature from external DSP SDKs (e.g. DFP).
- Swift
- Objective-C
GFPAdManager.adConfiguration().disableCrashReport = true
[GFPAdManager adConfiguration].disableCrashReport = YES;
Use Default In-App Browser
Uses the SDK's built-in in-app browser when landing on S2S ad destinations.
- Swift
- Objective-C
GFPAdManager.adConfiguration().useDefaultSafariBrowser = true
[GFPAdManager adConfiguration].useDefaultSafariBrowser = YES;
Ad Provider Test Mode
Configures specific ad providers to receive test ads.
- Swift
- Objective-C
GFPAdManager.adConfiguration().adProviderConfigList = [
.type(.DFP, testMode: true),
.type(.FAN, testMode: true)
]
[GFPAdManager adConfiguration].adProviderConfigList = @[
[GFPAdProviderSetting type:GFPAdProviderSettingTypeDFP testMode:YES],
[GFPAdProviderSetting type:GFPAdProviderSettingTypeFAN testMode:YES]
];