# AdsSettings Structure

    public struct AdsSettings

Immutable ad-SDK tuning values applied when initializing ad playback.

- `ppid`

  Publisher Provided Identification (PPID) sent with ads request

  #### Declaration

  Swift

      public let ppid: String?

- `language`

  Language specification used for localization. |Language| must be formatted as a canonicalized IETF BCP 47 language identifier such as would be returned by NSLocale.preferredLanguages. Setting this property after it has been sent to the IMAAdsLoader will be ignored and a warning will be logged. Default value is Locale.current.identifier

  #### Declaration

  Swift

      public let language: String

- `maxRedirects`

  Specifies maximum number of redirects after which subsequent redirects will be denied, and the ad load aborted. The number of redirects directly affects latency and thus user experience. This applies to all VAST wrapper ads. If the number of redirects exceeds |maxRedirects|, the ad request will fail with error code 302. The default value is 4.

  #### Declaration

  Swift

      public let maxRedirects: UInt

- `featureFlags`

  Feature flags and their states. Used to control experimental features.

  #### Declaration

  Swift

      public let featureFlags: [String : String]

- `enableBackgroundPlayback`

  Enable background audio playback for the SDK. The default value is false.

  #### Declaration

  Swift

      public let enableBackgroundPlayback: Bool

- `autoPlayAdBreaks`

  Specifies whether to automatically play VMAP and ad rules ad breaks. The default value is true.

  #### Declaration

  Swift

      public let autoPlayAdBreaks: Bool

- `disableNowPlayingInfo`

  Specifies whether to update the MPNowPlayingInfoCenter content with the title “Advertisement”. If disabled, MPNowPlayingInfoCenter is untouched. The default value is false.

  #### Declaration

  Swift

      public let disableNowPlayingInfo: Bool

- `playerType`

  The partner specified video player that is integrating with the SDK.

  #### Declaration

  Swift

      public let playerType: String?

- `playerVersion`

  The partner specified player version that is integrating with the SDK.

  #### Declaration

  Swift

      public let playerVersion: String?

- `sessionID`

  The session ID to identify a single user session. This should be a UUID. It is used exclusively for frequency capping across the user session.

  #### Declaration

  Swift

      public let sessionID: String?

- `sameAppKeyEnabled`

  Controls whether Same App Key is enabled. The value set persists across app sessions. The key is enabled by default.

  #### Declaration

  Swift

      public let sameAppKeyEnabled: Bool

- `waitForAdResponse`

  Delays main content playback until the ad response is received. This can help ensure that pre-roll ads are played before the main content starts.

  Default: true

  #### Declaration

  Swift

      public let waitForAdResponse: Bool

- `enableDebugMode`

  Toggles debug mode which will output detailed log information to the console. Debug mode should be disabled in Release and will display a watermark when enabled. The default value is false.

  #### Declaration

  Swift

      public let enableDebugMode: Bool

- `init(ppid:language:maxRedirects:featureFlags:enableBackgroundPlayback:autoPlayAdBreaks:disableNowPlayingInfo:playerType:playerVersion:sessionID:sameAppKeyEnabled:waitForAdResponse:enableDebugMode:)`

  Creates an `AdsSettings` value with explicit ad behavior configuration.

  #### Declaration

  Swift

      public init(
          ppid: String? = nil,
          language: String = Locale.current.identifier,
          maxRedirects: UInt = 4,
          featureFlags: [String: String] = [:],
          enableBackgroundPlayback: Bool = false,
          autoPlayAdBreaks: Bool = true,
          disableNowPlayingInfo: Bool = false,
          playerType: String? = nil,
          playerVersion: String? = nil,
          sessionID: String? = nil,
          sameAppKeyEnabled: Bool = true,
          waitForAdResponse: Bool = true,
          enableDebugMode: Bool = false
      )

  #### Parameters

  `ppid` | Publisher Provided Identifier sent with ad requests.
  `language` | IETF BCP-47 locale identifier for ad localization.
  `maxRedirects` | Maximum allowed VAST redirects.
  `featureFlags` | Experimental feature flags passed to the ad stack.
  `enableBackgroundPlayback` | Enables ad playback while app is backgrounded.
  `autoPlayAdBreaks` | Enables automatic playback for VMAP/ad-rule breaks.
  `disableNowPlayingInfo` | Prevents writing advertisement metadata to Now Playing.
  `playerType` | Integrator-defined player type identifier.
  `playerVersion` | Integrator-defined player version identifier.
  `sessionID` | Session identifier used by ad frequency-capping logic.
  `sameAppKeyEnabled` | Controls Same App Key behavior in the ad SDK.
  `waitForAdResponse` | Delays content start until ad response is available.
  `enableDebugMode` | Enables verbose ad debug logging and watermark.