JWImaSettingsBuilder

@objcMembers
public class JWImaSettingsBuilder : NSObject, JWBuilder

The builder for JWImaSettings, object used to configure the Google IMA SDK.

  • Declaration

    Swift

    public typealias Output = JWImaSettings
  • Builds a JWImaSettings structure for configure the Google IMA SDK.

    Declaration

    Swift

    @objc
    public func build() -> JWImaSettings
  • Sets the desired language for Google IMA SDK.

    Declaration

    Swift

    @discardableResult
    public func locale(_ locale: String) -> JWImaSettingsBuilder

    Parameters

    locale

    The language code used to localize the UI provided by the Google IMA SDK.

    Return Value

    The builder, so setters can be chained.

  • Sets the Publisher Provided Identification (PPID) that will be sent with ads request.

    Declaration

    Swift

    @discardableResult
    public func ppid(_ ppid: String) -> JWImaSettingsBuilder

    Parameters

    ppid

    The publisher provided identification String.

    Return Value

    The builder, so setters can be chained.

  • Set the maximum number of redirects.

    Declaration

    Swift

    @discardableResult
    public func maxRedirects(_ redirectLimit: UInt) -> JWImaSettingsBuilder

    Parameters

    redirectLimit

    An unsigend integer for the amount of redirects allowed.

    Return Value

    The builder, so setters can be chained.

  • Sets the session ID to identify a single user session. This should be a UUID string.

    Declaration

    Swift

    @discardableResult
    public func sessionID(_ sessionID: String) -> JWImaSettingsBuilder

    Parameters

    sessionID

    A String for a unique identifier.

    Return Value

    The builder, so setters can be chained.

  • Enable the IMA debug mode which will output detailed log information to the console.

    Warning

    This should be disabled for releases.

    Declaration

    Swift

    @discardableResult
    public func debugMode(_ enabled: Bool) -> JWImaSettingsBuilder

    Parameters

    enabled

    A boolean for the expected debug mode.

    Return Value

    The builder, so setters can be chained.