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.
- Swift
- Objective-C
BidMachineSdk.shared.populate {
$0.withLoggingMode(true)
$0.withBidLoggingMode(true)
$0.withEventLoggingMode(true)
}
[BidMachineSdk.shared populate:^(id<BidMachineInfoBuilderProtocol> builder) {
[builder withLoggingMode:YES];
[builder withBidLoggingMode:YES];
[builder withEventLoggingMode:YES];
}];
Test mode
BidMachine SDK can be configured to run in test mode, which is useful for testing and debugging purposes.
- Swift
- Objective-C
BidMachineSdk.shared.populate {
$0.withTestMode(true)
}
[BidMachineSdk.shared populate:^(id<BidMachineInfoBuilderProtocol> builder) {
[builder withTestMode:YES];
}];
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.
- Swift
- Objective-C
BidMachineSdk.shared.publisherInfo.populate {
$0.withId("")
$0.withName("")
$0.withDomain("")
$0.withCategories([String]())
}
[BidMachineSdk.shared.publisherInfo populate:^(id<BidMachinePublisherInfoBuilderProtocol> builder) {
[builder withId:@""];
[builder withName:@""];
[builder withDomain:@""];
[builder withCategories:@[]];
}];
Parameter | Type | Description |
---|---|---|
id | String | Publisher ID |
name | String | Publisher name |
domain | String | Publisher domain |
categories | Array<String> | Publisher categories |
Targeting Parameters
The targeting info is used to provide information about the user and the app.
- Swift
- Objective-C
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")
}
[BidMachineSdk.shared.targetingInfo populate:^(id<BidMachineTargetingInfoBuilderProtocol> builder) {
[builder withUserId:@""];
[builder withUserGender:BidMachineUserGenderMale];
[builder withUserYOB:(0)];
[builder withUserLocation:[[CLLocation alloc] initWithLatitude:1 longitude:2]];
[builder withCountry:@""];
[builder withCity:@""];
[builder withZip:@""];
[builder withKeywords:@""];
[builder withBlockedApps:@[]];
[builder withBlockedCategories:@[]];
[builder withBlockedAdvertisers:@[]];
[builder withStoreURL:@""];
[builder withStoreId:@""];
[builder withStoreCategory:@""];
[builder withStoreSubCategories:@[]];
[builder withPaid:YES];
[builder withFrameworkName:BidMachineFrameworkNameNative];
[builder appendExternalId:@"key" :@"value"];
}];
Parameter | Type | Description |
---|---|---|
userId | String | Vendor-specific ID for the user. |
userGender | BidMachineUserGender | Gender, one of the following: Female, Male, Unknown. |
userYOB | UInt32 | Year of birth as a 4-digit integer (e.g. 1990). |
userLocation | CLLocation | Location of the user's home base (i.e., not necessarily their current location). |
country | String | Country of the user's home base (i.e., not necessarily their current location). |
city | String | City of the user's home base (i.e., not necessarily their current location). |
zip | String | Zip code of the user's home base (i.e., not necessarily their current location). |
keywords | String | List of keywords, interests, or intents. |
blockedApps | Array<String> | Block list of apps where ads are disallowed. Use bundle/package names (e.g. com.foo.mygame ), not App Store IDs. |
blockedCategories | Array<String> | Block list of content categories using category IDs. |
blockedAdvertisers | Array<String> | Block list of advertisers by their domains (e.g. example.com ). |
storeURL | String | App Store URL for the installed app; required for IQG 2.1 compliance. |
storeId | String | Application identifier in the App Store (numeric string, e.g. "1111" ). |
storeCategory | String | Main category of the app in the store (e.g. "Games" , "Lifestyle" ). |
storeSubCategories | Array<String> | List of subcategories of the app in the store (e.g. ["Action", "Multiplayer"] ). |
paid | BOOL | Indicates whether the app is a paid version (true ) or free version (false ). |
frameworkName | BidMachineFrameworkName | Name 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.
- Swift
- Objective-C
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
NSString *bidId = banner.auctionInfo.bidId;
NSString *creativeId = banner.auctionInfo.creativeId;
NSString *dealId = banner.auctionInfo.dealId;
NSString *cId = banner.auctionInfo.cId;
NSString *demandSource = banner.auctionInfo.demandSource;
double price = banner.auctionInfo.price;
NSDictionary *customParams = banner.auctionInfo.customParams;
NSDictionary *customExtras = banner.auctionInfo.customExtras;
Parameter | Type | Description |
---|---|---|
bidId | String | Unique bid identifier |
creativeId | String? | Unique creative identifier |
dealId | String? | Unique deal identifier |
cId | String? | Campaign/grouping ID |
demandSource | String | Demand source name |
price | Double | Bid price |
customParams | [String: Any] / NSDictionary | Server custom parameters |
customExtras | [String: Any] / NSDictionary | Winner unit extras |
Win/Loss notifications
// TODO:
Server Extras
// TODO: