Teads SDK provides seamless access to both premium video advertising and content recommendation capabilities through a modern, unified interface. This sample app includes Teads iOS framework and demonstrates integration examples for Media Placements (video ads), Native Ads, and Feed Placements (content recommendations).
- Integration Documentation
- Migrating to v6
- Run the sample app
- SwiftUI sample app
- Installation
- Mediation Adapters
- Certifications
- Changelog
- Integration instructions are available on Teads Developer Portal.
- Installation guide is available here.
- Full integration guide is available here.
TeadsSDK v6 introduces a new unified createPlacement API. See Migration Documentation for details.
Clone this repository, open it with Xcode, and run project.
Alongside the UIKit TeadsSampleApp, the workspace ships a SwiftUI sample, TeadsSwiftUISampleApp, demonstrating Teads integration in SwiftUI-first apps. Both apps share the same workspace and Pods.
- Run
pod install. - Open
TeadsSampleApp.xcworkspace. - Select the
TeadsSwiftUISampleAppscheme and run on an iOS 16+ simulator.
The SwiftUI sample mirrors the UIKit TeadsSampleApp parity matrix and uses the same public test PIDs:
| Format | Provider | Containers |
|---|---|---|
| InRead | Direct | ScrollView, List, LazyVGrid, paginated TabView, WKWebView via UIViewRepresentable |
| InRead | AdMob, AppLovin, SAS | ScrollView, List, WKWebView (where the provider supports the integration) |
| Native | Direct | List, LazyVStack, tag-based List |
| Native | AdMob, AppLovin, SAS | List |
| Interstitial | AdMob | Article paywall + interstitial presentation |
| Showcase | Direct | Media (video) + Feed (content recommendations) in a single article |
The root catalogue (RootCatalogView) mirrors the UIKit RootController selection flow: Format β Provider β Creative β Integration, plus a Validation Mode toggle and a custom-PID alert.
The Direct InRead samples use the official SwiftUI API shipped by the SDK:
import SwiftUI
import TeadsSDK
struct ContentView: View {
private let config = TeadsAdPlacementMediaConfig(pid: 84242, articleUrl: URL(string: "https://www.teads.com"))
var body: some View {
ScrollView {
// ...article content...
TeadsAdPlacementSwiftUIView<TeadsAdPlacementMedia>(config: config)
}
}
}You can also use the .teadsAdPlacement(config:delegate:) view modifier, which stacks the ad below the modified content. For readability, the sample app aliases the generic view as TeadsMediaSwiftUIView (= TeadsAdPlacementSwiftUIView<TeadsAdPlacementMedia>) and TeadsFeedSwiftUIView for the Feed equivalent.
Mediation (AdMob, AppLovin, SAS), Native ads (any provider, including Teads Direct via TeadsAdPlacementMediaNative/TeadsNativeAdView) and the AdMob Interstitial flow render UIKit views. The sample bridges them into SwiftUI with focused UIViewRepresentable / UIViewControllerRepresentable wrappers (AdMobBannerHost, AppLovinBannerHost, SASBannerHost, TeadsNativeAdHost, etc.) β the same pattern publishers will use when embedding mediated ads in a SwiftUI screen.
To install the TeadsSDK just put this on your podfile, if you've never used cocoapods before please check the offical documentation.
pod 'TeadsSDK', '~> 6.0.5'On your terminal, go to the directory containing your project's .xcodeproj file and your Podfile and run pod install command. This will install Teads SDK along with our needed dependencies.
pod install --repo-updateBefore installing Teads adapter, you need to implement Google Mobile Ads in your application.
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.
- Add a package by selecting
FileβAdd Packagesβ¦in Xcodeβs menu bar. - Search for the Teads iOS SDK using the repo's URL:
https://github.com/teads/TeadsSDK-iOS- Next, set the Dependency Rule to be
Up to Next Major Versionand keep6.0.0 < 7.0.0. - Choose the Teads product that you want to be installed in your app:
TeadsSDK
- Add it to the
dependenciesof yourPackage.swift:
dependencies: [
.package(url: "https://github.com/teads/TeadsSDK-iOS", .upToNextMajor(from: "6.0.0"))
]- in any target that depends on a Teads product, add it to the
dependenciesarray of that target:
.target(
name: "MyTargetName",
dependencies: [
// The product(s) you want (e.g. TeadsSDK).
.product(name: "TeadsSDK", package: "Teads"),
]
),Teads SDK supports the IAB Open Measurement SDK, also known as OM SDK. The OM SDK brings transparency to the advertising world, giving a way to standardize the viewability and verification measurement for the ads served through mobile apps. Teads is part of the IAB's compliant companies.
See changelog here or check the Release Notes.
