Skip to main content

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

Requirements
  • Unity: 2021.3 or 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:

  1. Open Window → Package Manager
  2. Click the + button → Add package from git URL…
  3. 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.

  1. In your exported Xcode project, select Info.plist in the Project navigator
  2. Right-click on the Info.plist file → Open as → Source Code
  3. Copy the SKAdNetworkItems from the BidMachine iOS integration guide and paste them into your Info.plist file

Initialize the SDK

Initialize the SDK and set your Source ID.

tip

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");