Builder

@objc(AASDKAdswizzShimZoneBuilder)
public class Builder : NSObject

Builder class for AdswizzShimZone.

  • Set the zone ID for “shim” ads selection. Mandatory if zoneAlias is not set. Note that zoneId and zoneAlias are mutually exclusive. Please set one or the other, not both.

    Declaration

    Swift

    @objc
    public func with(zoneId: String) -> Builder

    Parameters

    zoneId

    identifies a pool of ads on the Adswizz AdServer

    Return Value

    the same builder object

  • Set an alternative zone identifier for ad selection. Mandatory if zoneId is not set. Note that zoneId and zoneAlias are mutually exclusive. Please set one or the other, not both.

    Declaration

    Swift

    @objc
    public func with(zoneAlias: String) -> Builder

    Parameters

    zoneId

    the alternative zone identifier

    Return Value

    the same builder object

  • Set the acceptable duration for “dead air” to fulfill the duration requirement. Optional. This parameter specifies if the Adswizz AdServer should continue the selection for the “shims” ads, depending on the remaining duration. e.g situations where the total duration of returned ads is (almost) filled with ads from the other non-shims zones so the “shim” ad(s) become(s) unnecessary and some “dead air” is acceptable. Measured in seconds and only accepts non-zero and positive values.

    Declaration

    Swift

    @objc
    public func with(maxDeadAir: TimeInterval) -> Builder

    Parameters

    maxDeadAir

    tolerance amount in seconds towards the duration fulfilment

    Return Value

    the same builder object

  • Builds an AdswizzShimZone object.

    Throws

    a missing zone ID error if the ID was not provided or was empty

    Declaration

    Swift

    @objc
    public func build() throws -> AdswizzShimZone

    Return Value

    a valid AdswizzShimZone object