Login
Welcome
Login

Import the Teads inApp SDK in your project

We regularly bring improvements and features to the Teads SDK inApp. 

Track the latest version and  changes here: AndroidiOS

Sample app available here: AndroidiOS

On this page


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.

Following JFrog announcement that Bintray will be deprecated from may 1st 2021, Teads SDK is now relying on Artifactory as an alternative hosting solution. More info.

app build.gradle (excerpt)

// Teads Repository
repositories {
maven {
url "https://teads.jfrog.io/artifactory/SDKAndroid-maven-prod"
}
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

We recommend:

COCOAPODS: 1.10.1+

Open your project's Podfile and add this line to your app's target:

pod 'TeadsSDK'

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.

Swift Package manager

SPM is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. To integrate TeadsSDK into your Xcode project using SPM, specify package repository url:

https://github.com/teads/TeadsSDK-iOS

Then select latest version available

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.

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 (Standard /  Webview)

SPM

Did you find it helpful? Yes No

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