Adapters are distributed as sub-specs with external dependencies. Add following lines into your Podfile:
📘
Note
If you haven't used CocoaPods before, please read this guide first.
platform :ios, '12.0'
source 'https://github.com/appodeal/CocoaPods.git'
source 'https://cdn.cocoapods.org/'
workspace 'YourApp.xcworkspace'
use_frameworks!
target 'YourTarget' do
project 'YourProject/YourTarget.xcodeproj'
pod "BidMachine", "~> 2.4.0.0"
pod "BidMachineAdColonyAdapter", "~> 2.4.0.0"
pod "BidMachineAmazonAdapter", "~> 2.4.0.0"
pod "BidMachineCriteoAdapter", "~> 2.4.0.0"
pod "BidMachineMetaAudienceAdapter", "~> 2.4.0.0"
pod "BidMachineMyTargetAdapter", "~> 2.4.0.0"
pod "BidMachineSmaatoAdapter", "~> 2.4.0.0"
pod "BidMachineTapjoyAdapter", "~> 2.4.0.0"
pod "BidMachineVungleAdapter", "~> 2.4.0.0"
pod "BidMachinePangleAdapter", "~> 2.4.0.0"
pod "BidMachineMintegralAdapter", "~> 2.4.0.0"
end
Registration
To register the Header Bidding Network - you need to call the registration method with network required initialization params
In order for header bidding networks to participate in bidding, you need to add to the request all the bidding ad units with which you want to auction. info about request
let unitConfig = BidMachineUnitConfiguration("name", // NETWORK_NAME
.banner, // AD UNIT TYPE
[String : Any](), // REQUIRED NETWORK UNIT PARAMS
[String : Any]()) // OPTIONAL ANY EXTRAS PARAMS
let requestConfig = try? BidMachineSdk.shared.requestConfiguration(.banner)
requestConfig?.populate { $0.withUnitConfigurations([unitConfig]) }
BidMachineUnitConfiguration *unitConfig = [[BidMachineUnitConfiguration alloc]
initWithName:@"name" // NETWORK_NAME
format:BidMachinePlacementFormatBanner // AD UNIT TYPE
params:@{} // REQUIRED NETWORK UNIT PARAMS
extras:@{}]; // OPTIONAL ANY EXTRAS PARAMS
NSError *error = nil;
id<BidMachineRequestConfigurationProtocol> requestConfig = [BidMachineSdk.shared requestConfiguration:BidMachinePlacementFormatBanner error:&error];
[requestConfig populate:^(id<BidMachineRequestBuilderProtocol> builder) {
[builder withUnitConfigurations:@[unitConfig]];
}];