Skip to main content

Adapter Integration

This page describes how to add the BidMachine adapter to an app that uses the CloudX SDK.

Initialization​

Initialize CloudX with your CloudX app key and load ads with CloudX ad unit IDs. CloudX initializes BidMachine automatically using the BidMachine Source ID from the CloudX dashboard, so no separate BidMachine initialization is needed in your app code. If another mediation SDK has already initialized BidMachine, the adapter reuses that initialization.

Android​

Requirements: CloudX Android SDK 4.9.0 or newer (4.12.0 or newer is recommended).

The BidMachine SDK is not available on Maven Central. Add the BidMachine Maven repository to settings.gradle(.kts):

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://artifactory.bidmachine.io/bidmachine")
content {
includeGroup("io.bidmachine")
includeGroup("io.bidmachine.libs")
includeGroup("io.bidmachine.media3")
includeGroup("com.explorestack")
}
}
}
}

Then add the adapter dependency to your app module's build.gradle(.kts):

dependencies {
implementation("io.cloudx:adapter-bidmachine:3.8.0.0")
}

iOS​

Requirements: iOS 13.0 or newer, CloudXCore 3.11.0 or newer (3.12.0 or newer is recommended).

The adapter is distributed through CocoaPods only. Add it to your Podfile:

pod 'CloudXBidMachineAdapter', '~> 3.8.2.0'

Then run:

pod install --repo-update

CocoaPods installs BidMachine SDK 3.8.2 as a dependency. No extra repository is needed.

Info.plist​

  • SKAdNetwork: add the BidMachine SKAdNetworkItems list. See SKAdNetwork Support and Info.plist.
  • App Tracking Transparency: add the NSUserTrackingUsageDescription key with a message explaining why you use the advertising identifier.
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

Unity​

Add the adapter to Assets/CloudXSdk/Editor/CloudXDependencies.xml.

Android​

Requirements: CloudX Android SDK 4.9.0 or newer (4.12.0 or newer is recommended).

Add the following inside the existing <androidPackages> section. The repository entry is required because the BidMachine SDK is not available on Maven Central.

<androidPackage spec="io.cloudx:adapter-bidmachine:3.8.0.0">
<repositories>
<repository>https://artifactory.bidmachine.io/bidmachine</repository>
</repositories>
</androidPackage>

Then run Assets → External Dependency Manager → Android Resolver → Force Resolve.

iOS​

Requirements: CloudX Unity SDK 4.10.0 or newer, which pins CloudXCore 3.11.0 (4.12.0 or newer is recommended). Older Unity SDK versions pin CloudXCore 3.10.0 and cannot resolve the adapter pod.

Add the following inside the existing <iosPods> section:

<iosPod name="CloudXBidMachineAdapter" version="3.8.2.0" minTargetSdk="13.0"/>

For Info.plist setup, follow the iOS section above.

Privacy​

The adapter forwards the GDPR consent and do-not-sell settings you set in CloudX to BidMachine. BidMachine also reads IAB TCF, US Privacy and GPP values on its own. Configure consent before initializing CloudX.

Adapter Compatibility​

PlatformAdapterAdapter VersionBidMachine SDKMinimum CloudX SDK
Androidio.cloudx:adapter-bidmachine3.8.0.03.8.04.9.0
iOSCloudXBidMachineAdapter3.8.2.03.8.2CloudXCore 3.11.0

For React Native and Flutter, as well as the latest adapter versions, refer to the CloudX BidMachine integration guide.