This guide is one of four that explains how to integrate the DT FairBid SDK for Android, iOS, and Unity apps. Android and iOS require platform-specific setup, whereas Unity uses plugins for integration to simplify the process and ensure cross-platform compatibility. Select the appropriate tab to access platform-specific requirements, setup procedures, and integration methods.
- SDK Integration (this guide)
- Setting Up DT Fairbid (in the DT Console)
- Initializing the SDK
- Ad Formats (adding the ads to your app)
Android
Current SDK Version
- 3.59.0
Note that since version 3.41.0, DT FairBid and DT Offer Wall are integrated through the same SDK - the DT FairBid SDK.
Prerequisites
- Android 4.1 (API Level 16)+
- Google Play Services 11.4.0+
Integration
DT supports both Gradle dependencies and manual downloads to integrate the SDK.
Gradle
Add DT Maven repository and plugins to your gradle build script:
- Add the following to your project's root level
build.gradle
file inside the repositories section. - At the root level
build.gradle
file, there are usually two repository sections - one forbuildscript
and one forallprojects
. Add the entry inallprojects
:
allprojects {
repositories {
mavenCentral()
}
...
}
- Add the following to the project app-level
build.gradle
file inside the plugins section (For additional information, see Types of Gradle Plugins):
plugins {
...
id 'com.fyber.fairbid-sdk-plugin' version '3.59.0'
...
}
- If you support Android SDK below 26, add the following snippet to the Android section (for Java Version Compatibility):
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
...
}
Manual Download
- Download the DT FairBid SDK.
- Extract the file.
- Import the .aar packages into your project.
Optional Permissions
The following permissions are not required for our SDK or 3rd-party SDKs to function, but including them in your AndroidManifest.xml may result in improved eCPM and user experience:
<!-- Optionally used by FairBid -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Adding 3rd Party SDKs
In addition to integrating the DT FairBid SDK, publishers using DT FairBid Mediation, must integrate chosen 3rd-party networks' SDKs into their app.
- Set up your app in the network's dashboard and the DT Console. For more information, see Setting Up DT FairBid.
- Download the relevant network's SDK. For more information about supported networks and their SDKs, see Supported Networks.
- You must add additional configurations for each third-party network.
- These entries are found by selecting your third-party networks in the table.
Important
The DT FairBid SDK automatically detects and initializes SDKs from 3rd-party networks.
Once you've added all third-party SDKs and set up your app in the console, you can initialize the DT Fairbid SDK.
iOS
Current SDK Version
- 3.59.0
Note that since version 3.41.0, DT FairBid and DT Offer Wall are integrated through the same SDK - the DT FairBid SDK.
Prerequisites
- Xcode 14.1+
- iOS 11+
Integration
There are three frameworks required to incorporate into your app:
Digital Turbine supports both CocoaPods and manual downloads to integrate the SDK.
CocoaPods
Add the following line to your Podfile and run the Pod install command:
pod 'FairBidSDK', '~ 3.59.0'
Manual Download
- Download and extract the DT FairBid SDK.
- Drag and drop
FairBidSDK.xcframework
to your project.
The Choose options for adding these files window appears:
- In the Action drop-down list, select Copy files to destination and click Finish.
- Download the DTX iOS SDK FMPAdapter.
- Drag and drop the
FMPAdapter.xcframework
to your project.
The Choose options for adding these files window appears: - In the Action drop-down list, select Copy files to destination and click Finish.
-
Retrieve the
IASDKCore.framework
from Integrating the iOS SDK and download the SDK manually. - From
DTExchangeSDK
/iOS
/IASDKCore
/IASDKCore.xcframework
, drag and drop theIASDKCore.xcframework
to your project.
The Choose options for adding these files window appears: - In the Action drop-down list, select Copy files to destination and click Finish.
- From the General tab of your Xcode project's target settings page, ensure
DT FairBidSDK
,FMPAdapter
, andIASDKCore
frameworks are embedded into your app under Embed & Sign.
Configuring Your Xcode Project
Configuration of the Xcode projects involves the following steps.
- Import System Frameworks.
- Disable Multitasking.
- Disable the Linked Products Build Flag.
- App Transport Security.
Importing System Frameworks
If the Enable Modules (CLANG_ENABLE_MODULES
) option is active in the project's Build Settings; there's no need to import any frameworks manually. Import the DT FairBid framework umbrella header in your code, for example, in the AppDelegate class:
#import <FairBidSDK/FairBidSDK.h>
Objective-C
import FairBidSDK
If you cannot enable modules, you might need to add the following frameworks to the Frameworks, Libraries and Embedded Content section in Xcode:
AdSupport
CoreGraphics
CoreLocation
CoreTelephony
MediaPlayer
MessageUI
MobileCoreServices
QuartzCore
Security
StoreKit
SystemConfiguration
Disable Multitasking
Select the Requires full-screen checkbox from the General tab of your Xcode project's target settings page.
This disables multitasking support, which must be disabled for ads to be able to set the orientation of their views:
Disable the Linked Products Build Flag
By default, Xcode strips libraries linked to the project. This may result in symbols missing for some ad networks, and subsequently, the DT FairBid SDK may not behave as expected.
To avoid this, set Strip Linked Products (STRIP_INSTALLED_PRODUCT
) build flag to No:
App Transport Security
App Transport Security (ATS) Settings is an Apple security feature that enforces HTTPS connections. Make sure you disable this by setting the Allow Arbitrary Downloads property to Yes so that you get the HTTP traffic as well. For more information, see ATS Configuration for DT Exchange SDK.
Adding 3rd Party SDKs
In addition to integrating the DT FairBid SDK, publishers who are using DT FairBid Mediation, must integrate chosen 3rd-party networks' SDKs into their app.
- Set up your app in the network's dashboard and in the DT Console. For more information, see Setting Up DT FairBid.
- Download the relevant network's SDK. For more information about supported networks and their SDKs, see Support Networks.
- You must add additional configurations for each third party network.
- These entries are found by selecting your third-party networks in the table.
- (Optional) The SKAdNetwork ID list may change over time. To ensure you have the most current information, DT recommends integrating the SKAdNetwork ID Auto Updater Tool into your build.
Important
The DT FairBid SDK automatically detects and initializes SDKs from 3rd-party networks.
Once you've added all third-party SDKs and set up your app in the console, you can initialize the DT Fairbid SDK.
Unity
Current Plugin Version
- 3.59.0
Note that since version 3.47.0, DT FairBid and DT Offer Wall are integrated through the same Unity Plugin - the DT FairBid Unity Plugin.
Prerequisites
- Android 4.1 (API level 16)+ (when building for Android)
- iOS 11+ (when building for iOS)
- Unity 2020 LTS or later
Important
The DT FairBid Unity Plugin can only be integrated into iOS projects from a Mac - you cannot build your iOS/Xcode project on Windows.
Integration
Digital Turbine supports two methods for the integration in Unity:
Integrating Through Unity's Package Manager
Tip
This is the recommended method to integrate the DT FairBid Unity Plugin in your Unity project.
The DT FairBid Unity Plugin is provided as a package in the NPM package registry. This package is imported using Unity Package Manager.
To import the package:
- Add the following entries inside your manifest.json file, which you can find under the Packages folder:
-
- Add an entry under
scopedRegistries
. Unity knows where to search when adding the DT FairBid Unity Plugin dependency. This entry points to the NPM package registry.
- Add an entry under
{
…
"scopedRegistries": [
{
"name": "npmjs",
"url": "https://registry.npmjs.org/",
"scopes": [
"com.fyber.fairbid.unity"
]
}
…
],
…
}
-
- Add an entry under
dependencies
, which references the DT FairBid Unity Plugin version that you intend to integrate.
- Add an entry under
{
…
"dependencies": {
"com.fyber.fairbid.unity": "3.59.0",
…
}
…
}
- Save the changes and open your Unity 3D Project.
The Unity Package Manager resolves the dependencies, and now the DT FairBid Unity Plugin is integrated into the project. - To cross-check the integration of DT FairBid, navigate to the Unity 3D Window toolbar menu and click Package Manager.
The Package Manager window shows DT FairBid under the DT section and the DT FairBid Unity Plugin version.
You can also change the DT FairBid Unity Plugin version you are integrating through the Unity Package Manager.
Importing DT FairBid Unity Plugin Raw Package
Follow the instructions below to download the DT FairBid Unity Plugin package manually.
Manual Download
Removing Current Plugin
If you are updating the Plugin:
- Make sure there is no trace of the previous version of the DT FairBid Unity Plugin.
- Remove the FairBid folder.
This is a fail-safe way to ensure no legacy file is left behind:
Importing New Plugin
- Download the DT FairBid Unity Plugin.
- Unzip the downloaded files.
- Add the FairBid.unitypackage to your open Unity project.
Once you've added the DT FairBid Unity Plugin and set up your app in the console, you can initialize the DT FairBid SDK.
Adding 3rd Party SDKs
In addition to integrating the DT FairBid SDK, publishers who are using DT FairBid Mediation, must integrate chosen 3rd-party networks' SDKs into their app.
- Set up your app in the network's dashboard and in the DT Console. For more information, see Setting Up DT FairBid.
- Download the relevant network's SDK. For more information about supported networks and their SDKs, see Supported Networks.
- You must add additional configurations for each third-party network.
- These entries are found by selecting your third-party networks in the table.
Important
The DT FairBid SDK automatically detects and initializes SDKs from 3rd-party networks.
Once you've added all third-party SDKs and set up your app in the console, you can initialize the DT Fairbid SDK.