PrebidRequest

@objcMembers
public class PrebidRequest : NSObject

Class that contains properties and methods to configure Prebid request.

Private properties

  • Initializes a new PrebidRequest with the given parameters.

    Declaration

    Swift

    public init(bannerParameters: BannerParameters? = nil, videoParameters: VideoParameters? = nil,
                nativeParameters: NativeParameters? = nil, isInterstitial: Bool = false, isRewarded: Bool = false)

    Parameters

    bannerParameters

    The banner parameters for the ad request.

    videoParameters

    The video parameters for the ad request.

    nativeParameters

    The native parameters for the ad request.

    isInterstitial

    Indicates if the request is for an interstitial ad.

    isRewarded

    Indicates if the request is for a rewarded ad.

GPID

  • Sets the GPID for the ad request.

    Declaration

    Swift

    public func setGPID(_ gpid: String?)

    Parameters

    gpid

    The GPID to set.

adunit ext data aka inventory data (imp[].ext.data)

  • This method obtains the ext data keyword & value for adunit targeting if the key already exists the value will be appended to the list. No duplicates will be added

    Declaration

    Swift

    public func addExtData(key: String, value: String)
  • This method obtains the ext data keyword & values for adunit targeting the values if the key already exist will be replaced with the new set of values

    Declaration

    Swift

    public func updateExtData(key: String, value: Set<String>)
  • This method allows to remove specific ext data keyword & values set from adunit targeting

    Declaration

    Swift

    public func removeExtData(forKey: String)
  • This method allows to remove all ext data set from adunit targeting

    Declaration

    Swift

    public func clearExtData()

adunit ext keywords (imp[].ext.keywords)

  • This method obtains the keyword for adunit targeting Inserts the given element in the set if it is not already present.

    Declaration

    Swift

    public func addExtKeyword(_ newElement: String)
  • This method obtains the keyword set for adunit targeting Adds the elements of the given set to the set.

    Declaration

    Swift

    public func addExtKeywords(_ newElements: Set<String>)
  • This method allows to remove specific keyword from adunit targeting

    Declaration

    Swift

    public func removeExtKeyword(_ element: String)
  • This method allows to remove all keywords from the set of adunit targeting

    Declaration

    Swift

    public func clearExtKeywords()

App Content (app.content.data)

  • Sets the app content for the ad request.

    Declaration

    Swift

    public func setAppContent(_ appContentObject: PBMORTBAppContent)

    Parameters

    appContentObject

    The PBMORTBAppContent to set.

  • Clears the app content for the ad request.

    Declaration

    Swift

    public func clearAppContent()
  • Adds data to the app content.

    Declaration

    Swift

    public func addAppContentData(_ dataObjects: [PBMORTBContentData])

    Parameters

    dataObjects

    The array of PBMORTBContentData to add.

  • Removes specific data from the app content.

    Declaration

    Swift

    public func removeAppContentData(_ dataObject: PBMORTBContentData)

    Parameters

    dataObject

    The PBMORTBContentData to remove.

  • Clears all data from the app content.

    Declaration

    Swift

    public func clearAppContentData()

User Data (user.data)

  • Adds user data to the ad request.

    Declaration

    Swift

    public func addUserData(_ userDataObjects: [PBMORTBContentData])

    Parameters

    userDataObjects

    The array of PBMORTBContentData to add.

  • Removes specific user data from the ad request.

    Declaration

    Swift

    public func removeUserData(_ userDataObject: PBMORTBContentData)

    Parameters

    userDataObject

    The PBMORTBContentData to remove.

  • Clears all user data from the ad request.

    Declaration

    Swift

    public func clearUserData()