Skip to main content

Advanced Settings

Logs

BidMachine SDK provides a set of logging options to help you debug and monitor the SDK's behavior. You can enable or disable different types of logs, such as general logs, bid logs, and event logs.

BidMachineSdk.shared.populate {
$0.withLoggingMode(true)
$0.withBidLoggingMode(true)
$0.withEventLoggingMode(true)
}

Test mode

BidMachine SDK can be configured to run in test mode, which is useful for testing and debugging purposes.

BidMachineSdk.shared.populate {
$0.withTestMode(true)
}

Location

SDK can automatically track user device location to serve better ads. SDK won't use location data unless you explicitly enable it.

Publisher Parameters

The publisher info is used to provide information about the publisher of the app. This information is used for targeting and reporting purposes.

BidMachineSdk.shared.publisherInfo.populate {
$0.withId("")
$0.withName("")
$0.withDomain("")
$0.withCategories([String]())
}
ParameterTypeDescription
idStringPublisher ID
nameStringPublisher name
domainStringPublisher domain
categoriesArray<String>Publisher categories

Targeting Parameters

The targeting info is used to provide information about the user and the app.

BidMachineSdk.shared.targetingInfo.populate {
$0.withUserId("")
$0.withUserGender(.male)
$0.withUserYOB(UInt32(1))
$0.withUserLocation(CLLocation(latitude : 1, longitude : 2))
$0.withCountry("")
$0.withCity("")
$0.withZip("")
$0.withKeywords("")
$0.withBlockedApps([String]())
$0.withBlockedCategories([String]())
$0.withBlockedAdvertisers([String]())
$0.withStoreURL("")
$0.withStoreId("")
$0.withStoreCategory("")
$0.withStoreSubCategories([String]())
$0.withPaid(true)
$0.withFrameworkName(.native)
$0.appendExternalId("key", "value")
}
ParameterTypeDescription
userIdStringVendor-specific ID for the user.
userGenderBidMachineUserGenderGender, one of the following: Female, Male, Unknown.
userYOBUInt32Year of birth as a 4-digit integer (e.g. 1990).
userLocationCLLocationLocation of the user's home base (i.e., not necessarily their current location).
countryStringCountry of the user's home base (i.e., not necessarily their current location).
cityStringCity of the user's home base (i.e., not necessarily their current location).
zipStringZip code of the user's home base (i.e., not necessarily their current location).
keywordsStringList of keywords, interests, or intents.
blockedAppsArray<String>Block list of apps where ads are disallowed. Use bundle/package names (e.g. com.foo.mygame), not App Store IDs.
blockedCategoriesArray<String>Block list of content categories using category IDs.
blockedAdvertisersArray<String>Block list of advertisers by their domains (e.g. example.com).
storeURLStringApp Store URL for the installed app; required for IQG 2.1 compliance.
storeIdStringApplication identifier in the App Store (numeric string, e.g. "1111").
storeCategoryStringMain category of the app in the store (e.g. "Games", "Lifestyle").
storeSubCategoriesArray<String>List of subcategories of the app in the store (e.g. ["Action", "Multiplayer"]).
paidBOOLIndicates whether the app is a paid version (true) or free version (false).
frameworkNameBidMachineFrameworkNameName of the framework used (e.g. Native, Unity).

Price Floor Parameters

TODO://

Custom Parameters

TODO://

Auction Info

The auction info provides details about the ad auction, including bid ID, creative ID, deal ID, campaign ID, demand source, price, and custom parameters.

let bidId        = ad.auctionInfo.bidId
let creativeId = ad.auctionInfo.creativeId
let dealId = ad.auctionInfo.dealId
let cId = ad.auctionInfo.cId
let demandSource = ad.auctionInfo.demandSource
let price = ad.auctionInfo.price
let customParams = ad.auctionInfo.customParams
let customExtras = ad.auctionInfo.customExtras
ParameterTypeDescription
bidIdStringUnique bid identifier
creativeIdString?Unique creative identifier
dealIdString?Unique deal identifier
cIdString?Campaign/grouping ID
demandSourceStringDemand source name
priceDoubleBid price
customParams[String: Any] / NSDictionaryServer custom parameters
customExtras[String: Any] / NSDictionaryWinner unit extras

Win/Loss notifications

// TODO:

Server Extras

// TODO: