Builder
@objc(AASDKAdswizzAdZoneBuilder)
public class Builder : NSObject
Builder class for AdswizzAdZone
.
-
Set the zone ID for ad selection. Mandatory if
zoneAlias
is not set. Note thatzoneId
andzoneAlias
are mutually exclusive. Please set one or the other, not both.Declaration
Swift
@objc public func with(zoneId: String) -> Builder
Parameters
zoneId
the zone identifier
Return Value
the same builder object
-
Set an alternative zone identifier for ad selection. Mandatory if
zoneId
is not set. Note thatzoneId
andzoneAlias
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 maximum number of ads requested during ad selection. Optional. Accepts only non-zero and positive values.
Declaration
Swift
@objc public func with(maxAds: UInt) -> Builder
Parameters
maxAds
maximum number of ads description
Return Value
the same builder object
-
Set the maximum duration of the ads during ad selection. Optional. Measured in seconds and only accepts non-zero and positive values.
Declaration
Swift
@objc public func with(maxDuration: TimeInterval) -> Builder
Parameters
maxDuration
maximum duration in seconds
Return Value
the same builder object
-
Builds an
AdswizzAdZone
object.Throws
a missing zone ID error if the ID was not provided or was emptyDeclaration
Swift
@objc public func build() throws -> AdswizzAdZone
Return Value
a valid
AdswizzAdZone
object