Login
Welcome
Login

Import the Teads inApp SDK in your project

On this page

⚠️ We regularly bring improvements and new features for our SDK. 

Please check changes and versions here: AndroidiOS 


Prerequisites

Importing the Teads inApp SDK

Import the Teads SDK with a Gradle dependency that points to Teads' Maven repository. In order to use that repository, you need to reference it in the app build.gradle file.

app build.gradle (excerpt)

// Teads Repository
repositories {
maven {
url "http://dl.bintray.com/teads/TeadsSDK-android"
}
maven {

       // Mandatory for Huawei device compatibility
url "https://developer.huawei.com/repo/"
     }

}

Next, in the same file edit the app dependencies node like so (As our SDK uses the google play services don't forget to include it):

app build.gradle (excerpt)

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'

// Required dependency
implementation 'com.google.android.gms:play-services-ads:15.0.1'

// Teads SDK
implementation("tv.teads.sdk.android:sdk:X.Y.Z@aar") {
transitive = true
}


  // Mandatory for Huawei device compatibility
  implementation 'com.huawei.hms:ads-identifier:3.4.28.313'

}

Replace the X.Y.Z above with the latest release version.

Next, you will need to perform Gradle sync to download the SDK.

CocoaPods

The simplest way to import the SDK into an iOS project is with CocoaPods. Open your project's Podfile and add this line to your app's target (This version is only compatible for Xcode 11):

pod 'TeadsSDK', 'X.Y.Z'

Replace the X.Y.Z above with the latest release version.

Then from the command line run:

pod install --repo-update

If you don't know how to use CocoaPods and Podfiles, have a look at their official documentation.

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate TeadsSDK into your Xcode project using Carthage, specify it in your Cartfile (only available since 4.3.1):

github "teads/TeadsSDK-iOS"

Run carthage update to build the framework and drag the built TeadsSDK.framework into your Xcode project.

Manual framework import

You can also find our framework in the Teads repository.
if you use Xcode 10 you can use this framework from our repository.

After integrating the SDK to your project you just need to import it in the class where you will use it. Like that:

Swift Objective-C
import TeadsSDK

Configure TeadsSDK

Configure a Teads shared instance, typically in your app's application:didFinishLaunchingWithOptions: method:

Swift Objective-C
Teads.configure()

Ad Formats

The SDK is now ready to be used within your app. You can check how to integrate the Teads inApp SDK (StandardStandard /  WebviewWebview)

You also have the option to integrate custom ad formats. A custom ad can occupy a spot anywhere in the app. They can be sticky or in scrollable content while users are interacting with the app.

You can find integration examples in our public repository.

You can find integration examples in our public repository.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.