This article provides instructions for integrating the DT Offer Wall which is included in the DT FairBid SDK. You can integrate DT Offer Wall on Android, iOS, and Unity platforms. 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.
Tip
Offer Wall and FairBid are parts of the same integration package, so if you have already integrated FairBid in your app, skip to OfferWall configuration.
Android
Current SDK Version: 3.60.0
Prerequisites
Android API | Android 4.1 (API Level 16) or later. |
---|---|
Kotlin | 2.1.0 or later. |
Google Play Services | 11.4.0 or later. |
Tooling
FairBid SDK does not require specific tooling, e.g., Android Studio, Android Gradle Plugin (AGP), Java Development Kit (JDK), and Gradle. However, if you use the following versions of Gradle, use the following versions of AGP and JDK:
GRADLE | AGP | JDK |
---|---|---|
7.5 or later | 7.4.2 | 11 |
8 or later | 8 or later | 17 |
Compile and Target SDK
FairBid SDK does not require specific compile or target SDK versions for your app. It maintains compatibility by performing runtime checks for APIs that are not available in the minimum supported version (API Level 16). The highest Android API that FairBid directly utilizes is API Level 30.
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.60.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.
iOS
Current SDK Version: 3.60.0
Prerequisites
- Xcode 14.1+
- iOS 11+
Integration
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.60.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:
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 option (CLANG_ENABLE_MODULES
) 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.
Unity
Current Plugin Version: 3.60.0
Prerequisites
- Android 4.1 (API level 16) or later, when building for Android
- iOS 11 or later, when building for iOS
- Unity 2021 or later
Important
Integrating DT FairBid for Unity iOS development requires a macOS environment. Building your iOS/Xcode project is not supported on Windows.
Tooling
When integrating the FairBid SDK into your Unity app, make sure your development environment meets the following minimum compatibility requirements.
UNITY EDITOR | ANDROID SDK | KOTLIN | GRADLE | JDK | AGP |
---|---|---|---|---|---|
2022.3 | API Level 16 | 2.1.0 | 7.6.3 | 11 | 7.4.2 |
2021.3 | API Level 16 | 2.1.0 | 7.6.3 | 11 | 7.4.2 |
While FairBid may work with other Unity Editor versions, DT tests FairBid against these specific versions. Additionally, the recommended tooling (JDK, Gradle, and AGP) versions reflect the defaults included with each Unity version. These can be overridden, but DT recommends using these versions to avoid conflicts in your build process.
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.60.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. - Cross-check the DT FairBid integration in Unity 3D by going to Window→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 and show the DT Offer Wall.