We regularly bring improvements and features to the Teads SDK inApp.
On this page
Prerequisites
- Min Android SDK Version level 28 or higher (98.1%+)
- Have a Teads account, contact your local account manager
- Xcode 12 or higher
- Target iOS 10.0 or higher (95% of the devices)
- Have a Teads account, contact your Local account manager
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:
import TeadsSDK
#import <TeadsSDK/TeadsSDK.h>
Configure TeadsSDK
Configure a Teads shared instance, typically in your app's application:didFinishLaunchingWithOptions:
method:
Teads.configure()
[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)