Prebid
@objcMembers
public class Prebid : NSObject
The Prebid class manages the configuration and initialization of the PrebidMobile SDK.
-
Indicates whether the timeout value has been updated.
Declaration
Swift
public var timeoutUpdated: Bool -
The Prebid Server account ID.
Declaration
Swift
public var prebidServerAccountId: String -
The Prebid auction settings ID.
Declaration
Swift
public var auctionSettingsId: String? -
Enables or disables debug mode. ORTB: bidRequest.test
Declaration
Swift
public var pbsDebug: Bool -
Custom HTTP headers to be sent with requests.
Declaration
Swift
public var customHeaders: [String : String] -
Stored bid responses identified by bidder names.
Declaration
Swift
public var storedBidResponses: [String : String] -
Optional Delegate which returns Request and Response Data for further processing
Declaration
Swift
public weak var eventDelegate: PrebidEventDelegate? -
This property is set by the developer when he is willing to assign the assetID for Native ad.
Declaration
Swift
public var shouldAssignNativeAssetID: Bool -
This property is set by the developer when he is willing to share the location for better ad targeting
Declaration
Swift
public var shareGeoLocation: Bool -
Set the desidered verbosity of the logs
Declaration
Swift
public var logLevel: LogLevel { get set } -
The singleton instance of the
Prebidclass.Declaration
Swift
public static let shared: Prebid -
The version of the PrebidMobile SDK.
Declaration
Swift
public var version: String { get } -
The version of the OM SDK.
Declaration
Swift
public var omsdkVersion: String { get }
-
Custom status endpoint for the Prebid Server.
Declaration
Swift
public var customStatusEndpoint: String? { get set } -
Timeout for Prebid requests in milliseconds.
Declaration
Swift
public var timeoutMillis: Int { get set } -
Dynamic timeout value.
Declaration
Swift
public var timeoutMillisDynamic: NSNumber? -
Stored auction response.
Declaration
Swift
public var storedAuctionResponse: String?
-
Indicates whether the PBS should cache the bid for the rendering API. If the value is true the SDK will make the cache request in order to report the impression event respectively to the legacy analytic setup.
Declaration
Swift
public var useCacheForReportingWithRenderingAPI: Bool -
Controls how long each creative has to load before it is considered a failure.
Declaration
Swift
public var creativeFactoryTimeout: TimeInterval -
Controls how long video and interstitial creatives have to load before it is considered a failure.
Declaration
Swift
public var creativeFactoryTimeoutPreRenderContent: TimeInterval -
If set to true, the output of PrebidMobile’s internal logger is written to a text file. This can be helpful for debugging. Defaults to false.
Declaration
Swift
public var debugLogFileEnabled: Bool { get set } -
If true, the SDK will periodically try to listen for location updates in order to request location-based ads.
Declaration
Swift
public var locationUpdatesEnabled: Bool { get set } -
If true, the sdk will add
includewinnersflag inside the targeting object described in PBS DocumentationDeclaration
Swift
public var includeWinners: Bool -
If true, the sdk will add
includebidderkeysflag inside the targeting object described in PBS DocumentationDeclaration
Swift
public var includeBidderKeys: Bool -
If true, the SDK will not check the PBS status during initialization. This will save initialization time if the PBS endpoint is always live and handled client side
Declaration
Swift
public var shouldDisableStatusCheck: Bool
-
Adds a stored bid response.
Declaration
Swift
public func addStoredBidResponse(bidder: String, responseId: String)Parameters
bidderThe name of the bidder.
responseIdThe response ID.
-
Clears all stored bid responses.
Declaration
Swift
public func clearStoredBidResponses() -
Retrieves stored bid responses.
Declaration
Swift
public func getStoredBidResponses() -> [[String : String]]?Return Value
An array of dictionaries containing stored bid responses, or nil if there are none.
-
Adds a custom HTTP header.
Declaration
Swift
public func addCustomHeader(name: String, value: String)Parameters
nameThe name of the header.
valueThe value of the header.
-
Clears all custom HTTP headers.
Declaration
Swift
public func clearCustomHeaders() -
Checks the status of Prebid Server. The
customStatusEndpointproperty is used as server status endpoint. IfcustomStatusEndpointproperty is not provided, the SDK will use default endpoint -host+/status.Checks the version of GMA SDK. If the version is not supported - logs warning.
Use this SDK initializer if you’re using PrebidMobile with GMA SDK.
Declaration
Swift
public static func initializeSDK( serverURL: String, _ gadMobileAdsObject: AnyObject? = nil, _ completion: PrebidInitializationCallback? = nil) throwsParameters
serverURLThe custom Prebid Server URL, used when a user allowed the app to track
gadMobileAdsObjectGADMobileAds object
completionreturns initialization status and optional error
-
Checks the status of Prebid Server. The
customStatusEndpointproperty is used as server status endpoint. IfcustomStatusEndpointproperty is not provided, the SDK will use default endpoint -host+/status.Checks the version of GMA SDK. If the version is not supported - logs warning.
Use this SDK initializer if you’re using PrebidMobile with GMA SDK.
Declaration
Swift
public static func initializeSDK( serverURL: String, nonTrackingURLString: String, _ gadMobileAdsObject: AnyObject? = nil, _ completion: PrebidInitializationCallback? = nil) throwsParameters
serverURLThe custom Prebid Server URL, used when a user allowed the app to track
nonTrackingURLStringThe custom Prebid Server URL, used when a user rejected the app to track
gadMobileAdsObjectGADMobileAds object
completionreturns initialization status and optional error
-
Initializes PrebidMobile SDK.
Checks the status of Prebid Server. The
customStatusEndpointproperty is used as server status endpoint. IfcustomStatusEndpointproperty is not provided, the SDK will use default endpoint -host+/status.Checks the version of GMA SDK. If the version is not supported - logs warning.
Use this SDK initializer if you’re using PrebidMobile with GMA SDK.
Declaration
Swift
public static func initializeSDK( serverURL: String, gadMobileAdsVersion: String? = nil, _ completion: PrebidInitializationCallback? = nil) throwsParameters
serverURLThe custom Prebid Server URL, used when a user allowed the app to track
gadMobileAdsVersionGADMobileAds version string, use
GADGetStringFromVersionNumber(GADMobileAds.sharedInstance().versionNumber)to get itcompletionreturns initialization status and optional error
-
Initializes PrebidMobile SDK.
Checks the status of Prebid Server. The
customStatusEndpointproperty is used as server status endpoint. IfcustomStatusEndpointproperty is not provided, the SDK will use default endpoint -host+/status.Checks the version of GMA SDK. If the version is not supported - logs warning.
Use this SDK initializer if you’re using PrebidMobile with GMA SDK.
Declaration
Swift
public static func initializeSDK( serverURL: String, nonTrackingURLString: String, gadMobileAdsVersion: String? = nil, _ completion: PrebidInitializationCallback? = nil) throwsParameters
serverURLThe custom Prebid Server URL, used when a user allowed the app to track
nonTrackingURLStringThe custom Prebid Server URL, used when a user rejected the app to track
gadMobileAdsVersionGADMobileAds version string, use
GADGetStringFromVersionNumber(GADMobileAds.sharedInstance().versionNumber)to get itcompletionreturns initialization status and optional error
-
Initializes PrebidMobile SDK.
Checks the status of Prebid Server. The
customStatusEndpointproperty is used as server status endpoint. IfcustomStatusEndpointproperty is not provided, the SDK will use default endpoint -host+/status.Use this SDK initializer if you’re using PrebidMobile without GMA SDK.
Declaration
Swift
public static func initializeSDK( serverURL: String, _ completion: PrebidInitializationCallback? = nil) throwsParameters
serverURLThe custom Prebid Server URL, used when a user allowed the app to track
completionreturns initialization status and optional error
-
Initializes PrebidMobile SDK.
Checks the status of Prebid Server. The
customStatusEndpointproperty is used as server status endpoint. IfcustomStatusEndpointproperty is not provided, the SDK will use default endpoint -host+/status.Use this SDK initializer if you’re using PrebidMobile without GMA SDK.
Declaration
Swift
public static func initializeSDK( serverURL: String, nonTrackingURLString: String, _ completion: PrebidInitializationCallback? = nil) throwsParameters
serverURLThe custom Prebid Server URL, used when a user allowed the app to track
nonTrackingURLStringThe custom Prebid Server URL, used when a user rejected the app to track
completionreturns initialization status and optional error
-
Undocumented
Declaration
Swift
public static func registerPluginRenderer(_ pluginRenderer: PrebidMobilePluginRenderer) -
Undocumented
Declaration
Swift
public static func unregisterPluginRenderer(_ pluginRenderer: PrebidMobilePluginRenderer) -
Undocumented
Declaration
Swift
public static func containsPluginRenderer(_ pluginRenderer: PrebidMobilePluginRenderer) -> Bool