Skip to main content

Settings Configuration

info

Settings Overview: This page covers all configuration settings available in the Teads SDK for iOS, organized by placement type and use case. For full integration steps, see the Integration Guide (direct placements) and the Mediation guides (AdMob placements).

TeadsSDK

NameTypeField/MethodDescription
TeadsSDKVersionNumberDoubleFieldCurrent TeadsSDK Version number (read-only)
TeadsSDKVersionStringStringFieldCurrent TeadsSDK Version string in semver format (read-only)
testModeBoolFieldTest mode flag. Set to true to activate test mode, false to deactivate. Enables more detailed logs (viewability percentage, for instance).
isCrashMonitoringEnabledBoolFieldControls whether crash monitoring is enabled for the Teads SDK. When enabled (default: true), the SDK will collect and report crash information.
configure(with partnerKey: String?)VoidMethodInitialize the Teads SDK. Call this in AppDelegate.didFinishLaunchingWithOptions to increase launch speed and load ads faster. Optional partner key for Outbrain integration.
createPlacement<PlacementType>(with config: PlacementType.Config, delegate: TeadsAdPlacementEventsDelegate?)PlacementTypeMethodGeneric method to create any placement type (Feed, Media, MediaNative, Recommendations) using their respective config objects.
createInReadPlacement(pid: Int, settings: TeadsAdPlacementSettings, delegate: TeadsInReadAdPlacementDelegate?)TeadsInReadAdPlacementMethodCreate a legacy inRead ad placement to request inRead ads. Returns TeadsInReadAdPlacement instance that must be owned/retained.
createNativePlacement(pid: Int, settings: TeadsAdPlacementSettings, delegate: TeadsNativeAdPlacementDelegate?)TeadsNativeAdPlacementMethodCreate a legacy native ad placement to request native ads. Returns TeadsNativeAdPlacement instance that must be owned/retained.
createPrebidPlacement(settings: TeadsAdPlacementSettings, delegate: TeadsInReadAdPlacementDelegate?)TeadsPrebidAdPlacementMethodCreate a legacy inRead ad placement to request load Prebid ad response. Returns TeadsPrebidAdPlacement instance that must be owned/retained.

TeadsAdPlacementMedia

ConfigurationTypeDescription
pidIntPublisher ID from your publisher manager
articleUrlURL?URL of the article where the ad will be displayed. Provides context for brand safety purposes
enableValidationModeBoolEnable the Validation Tool mode for testing and debugging ad placements

TeadsAdPlacementMediaNative

ConfigurationTypeDescription
pidIntPublisher ID from your publisher manager
articleUrlURL?URL of the article where the ad will be displayed. Provides context for brand safety purposes

TeadsAdPlacementFeed

NameTypeField/MethodDescription
articleUrlURLFieldURL of the article where the feed will be displayed
widgetIdStringFieldWidget identifier
installationKeyStringFieldInstallation key for your app
widgetIndexIntFieldIndex of the widget in the feed
userIdString?FieldOptional user identifier for personalization
darkModeBoolFieldEnable dark mode theme for the feed widget (default: false)
testDisplayBoolFieldEnable test display mode for debugging (default: false)
infiniteWidgetsOnTheSamePageBoolFieldAllow infinite widgets on the same page (default: false)
printLogs(domain: String?)VoidStatic MethodPrint logs for debugging purposes with optional domain filtering

TeadsAdPlacementRecommendations

NameTypeField/MethodDescription
articleUrlURLFieldURL of the article for which recommendations will be fetched
widgetIdStringFieldWidget identifier
widgetIndexIntFieldIndex of the widget (default: 0)
testLocationString?FieldTest location for Geo simulation (country code, e.g., "us")
testRTBBoolFieldEnable test RTB mode for debugging (default: false)
configureViewabilityPerListing(for: UIView, withRec: OBRecommendation)VoidStatic MethodConfigure viewability tracking for individual recommendation listings
getAboutURL()StringStatic MethodGet the ad choices URL
getUrl(_ rec: OBRecommendation)StringStatic MethodGet URL for a specific recommendation

TeadsAdPlacementBanner

Banner placement (direct integration). See the Integration Guide — Banner for the full integration steps.

NameTypeField/MethodDescription
articleUrlURLFieldURL of the article where the ad will be displayed
widgetIdStringFieldWidget identifier
installationKeyStringFieldInstallation key for your app
widgetIndexIntFieldIndex when multiple widgets share the same page (default 0)
userIdString?FieldOptional user identifier for personalization
darkModeBoolFieldEnable dark mode theme (default false)
extIdString?FieldOptional external identifier
extSecondaryIdString?FieldOptional secondary external identifier
obPubImpString?FieldOptional publisher impression id override
floorPriceInt?FieldFloor price in US dollars. Forwarded to the auction as the placement floor price. Only positive values are forwarded.

Banner ads are configured through the custom event parameter JSON in the AdMob dashboard. See the Mediation - Banner guide for the full integration steps.

NameTypeField/MethodDescription
articleUrlStringJSON fieldURL of the article where the ad will be displayed (unique per publisher)
widgetIdStringJSON fieldWidget identifier (unique per publisher)
installationKeyStringJSON fieldInstallation key for your app (unique per publisher)
widgetIndexIntJSON fieldIndex when multiple widgets share the same page (default 0)
userIdStringJSON fieldOptional publisher-provided user identifier
darkModeBoolJSON fieldEnable dark mode theme (default false)
extIdStringJSON fieldExternal tracking id
extSecondaryIdStringJSON fieldSecondary external tracking id
obPubImpStringJSON fieldPublisher impression id override
pbfIntJSON fieldFloor price in US dollars. Forwarded to the auction as the placement floor price.

TeadsAdapterSettings

NameTypeField/MethodDescription
enableDebug()VoidMethodEnable debug logging for Teads inApp SDK.
userConsent(subjectGdpr: String, consent: String, tcfVersion: TCFVersion, cmpSdkId: Int)VoidMethodThe GDPR consent and status, should match the IAB specifications.
setUsPrivacy(usPrivacy: String)VoidMethodThe CCPA consent string, should match the IAB specifications.
setGppConsent(consent: String, sectionIds: String)VoidMethodThe GPP consent and applicable section ids, should match the IAB specifications.
disableBatteryMonitoring()VoidMethodPrevent to automatically set UIDevice.current.isBatteryMonitoringEnabled.
disableCrashMonitoring()VoidMethodDisable crash monitoring that collects crashes on Teads SDK by default.
disableTeadsAudioSessionManagement()VoidMethodBy default, the Teads SDK handles the audio session by setting its category to ambient. This means that all the audio played by other apps will be simply mixed with the ad sound.
pageUrl(url: String)VoidMethodProvide context for brand safety purposes.
enableValidationMode()VoidMethodEnable the Validation Tool mode.
addExtras(String, for: String)VoidMethodAdd the given extra to your placement and request settings data.
registerAdView(UIView, delegate: TeadsMediatedAdViewDelegate)VoidMethodRegister the ad view in case of mediation adapter.
setMediaScale(_ mediaScale: MediaScale)VoidMethodSet how the MediaView fits on its container. Works for images only on inFeed native creatives.

MediaScale Enum Values

ValueDescription
MediaScale.scaleAspectFillContents scaled to fill with fixed aspect. Some portion of content may be clipped. Behaviour is similar to UIView.ContentMode.scaleToFill.
MediaScale.scaleAspectFitContents scaled to fit with fixed aspect. Remainder is transparent. Behaviour is similar to UIView.ContentMode.scaleAspectFit.

Audio Management

SettingDescriptionUse Case
disableTeadsAudioSessionManagement()Disable automatic audio session managementWhen you want to handle audio sessions manually
Default behaviorSDK sets audio session category to ambientAllows mixing with other app audio

Best Practices

Production Settings

  • Remove enableValidationMode() before production
  • Remove testing configurations in production builds
  • Ensure proper privacy consent is configured
  • Set appropriate url for brand safety
  • Use production placement IDs and installation keys

Testing Settings

  • Use enableValidationMode() for integration testing
  • Use testing configurations for development and debugging
  • Test with different privacy consent scenarios
  • Verify settings work across all placement types
  • Use test placement IDs and installation keys

Performance Optimization

  • Initialize SDK early in application lifecycle
  • Use appropriate placement lifecycle management
  • Monitor memory usage and performance