BidInfo

@objcMembers
@objc(PBMBidInfo)
public class BidInfo : NSObject

Contains information about bid.

  • Key to get Prebid win event from events

    Declaration

    Swift

    public static let EVENT_WIN: String
  • Key to get Prebid imp event from events

    Declaration

    Swift

    public static let EVENT_IMP: String
  • The result code of the bid request

    Declaration

    Swift

    public private(set) var resultCode: ResultCode { get }
  • Targeting keywords associated with the bid

    Declaration

    Swift

    public private(set) var targetingKeywords: [String : String]? { get }
  • exp

    The expiration time of the bid

    Declaration

    Swift

    public private(set) var exp: Double? { get }
  • The cache ID for native ads

    Declaration

    Swift

    public private(set) var nativeAdCacheId: String? { get }
  • Events related to the bid

    Declaration

    Swift

    public private(set) var events: [String : String] { get }
  • True when Prebid.shared.filterOutUncachedBids removed the bid Prebid Server designated as the winner because it had no successful Prebid Cache entry, and a lower-priced cached bid was promoted in its place.

    The demand is still valid and its targeting is attached to the ad object, so resultCode remains .prebidDemandFetchSuccess. This flag exists purely so publishers can track the yield impact of the filtering.

    Declaration

    Swift

    public private(set) var topBidFiltered: Bool { get }
  • Initializes a new BidInfo instance with the specified parameters.

    Declaration

    Swift

    public init(resultCode: ResultCode, targetingKeywords: [String : String]? = nil, exp: Double? = nil,
                nativeAdCacheId: String? = nil, events: [String: String] = [:],
                topBidFiltered: Bool = false)

    Parameters

    resultCode

    The result code of the bid request.

    targetingKeywords

    Optional targeting keywords associated with the bid.

    exp

    Optional expiration time of the bid.

    nativeAdCacheId

    Optional cache ID for native ads.

    events

    Optional dictionary of events related to the bid.

    topBidFiltered

    Whether the PBS-designated winning bid was filtered out for lacking a cache entry and a lower-priced cached bid was promoted in its place.

  • Retrieves the expiration time of the bid as an NSNumber.

    Declaration

    Swift

    public func getExp() -> NSNumber?