Integration
The following page describes how to integrate the BidMachine SDK into your Unity project.
The latest BidMachine Unity Plugin version is 3.6.0.
Install the SDK
- Unity:
2021.3or later - Android SDK:
21+ - iOS:
13.0+ - Xcode:
15.3+
Unity Package Manager
Add the package via the Unity Package Manager using the Git URL:
- Open Window → Package Manager
- Click the + button → Add package from git URL…
- Enter the following URL:
https://github.com/bidmachine/bidmachine-unity-plugin-upm.git#v3.6.0
App Tracking Transparency (iOS)
BidMachine SDK supports App Tracking Transparency (ATT) framework. If you're unfamiliar with it, we recommend reviewing Apple's documentation on ATT as part of this process.
SKAdNetwork IDs (iOS)
The SDK supports SKAdNetwork to allow ad networks to attribute app installs even when IDFA is unavailable.
To enable this functionality, you need to add the SKAdNetworkItems key to your iOS project's Info.plist file.
- In your exported Xcode project, select
Info.plistin the Project navigator - Right-click on the
Info.plistfile → Open as → Source Code - Copy the SKAdNetworkItems from the BidMachine iOS integration guide and paste them into your
Info.plistfile
Initialize the SDK
Initialize the SDK and set your Source ID.
To get your SOURCE_ID, visit our website or contact support.
using BidMachineInc.Ads.Api;
BidMachine.Initialize("<YOUR_SOURCE_ID>");
Check Initialization Status
bool isReady = BidMachine.IsInitialized();
Set Custom Endpoint
If required, you can set a custom BidMachine endpoint before initialization:
BidMachine.SetEndpoint("https://your-endpoint.com");