Migrating from SDK 2 to SDK 3
This guide explains how to upgrade the following integrations:
- Taboola SDK
- Taboola React Native plugin
This guide does not cover how to upgrade a Taboola Flutter plugin integration.
Introduction
In order to streamline the integration, most of the methods and events from SDK 2 and React Native 2.x have been updated or replaced, as well as the integration methodology. As such, when migrating from SDK 2 to SDK 3 (including React Native 2.x to 3.x) treat it as a new integration.
Placement codes used for SDK 2 can be used with SDK 3 and no new codes are required for the upgrade.
Additional migration guidelines for Android and iOS SDKs are provided below:
Migration Guidelines for Android SDK 2.x -> 3.x
Treat SDK 3 as a new integration.
It is not sufficient to update the.gradle
file only.
-
Update
build.gradle
to use the latest SDK 3 version (<<androidSDKVersion>>
).For detailed instructions, see:
- Android - Classic > First Steps
- Android - Web > First Steps
-
From within Android Studio, select: File > Sync Project With Gradle Files.
-
Remove (or comment) out all Taboola SDK 2 code: init methods, setters, listeners, XML files, etc.
-
From within Android Studio, select: Build > Clean Project.
-
Build the project and verify it compiles correctly, with the newly removed SDK 2 code.
Compilation errors?
From within Android Studio, select: File > Invalidate Caches/Restart
-
Implement the SDK 3 integration - see:
- Android - Classic > Basic Integration
- Android - Web > Basic Integration
Migration Guidelines for iOS SDK 2.x -> 3.x
Treat SDK 3 as a new integration.
It is not sufficient to update thepod
file only.
-
Edit your
pod
file to use the latest SDK 3 version (<<iosSDKVersion>>
).For detailed instructions, see:
- iOS - Classic > First Steps
- iOS - Web > First Steps
-
Run
pod install
. -
Remove (or comment) out all Taboola SDK 2 code: init methods, setters, delegates, Storyboard elements, etc.
-
From within Xcode, select: Product > Clean Build Folder.
-
Build the project and verify it compiles correctly (with the removed SDK 2 code).
Compilation errors?
In the project root directory:
- Run
rm -rf Pods
to remove all pod files. - Run
pod install
to install the SDK 3 pods.
- Run
-
Implement the SDK 3 integration - see:
- iOS - Classic > Basic Integration
- iOS - Web > Basic Integration
Migration Guidelines for React-Native plugin 2.x to 3.x
Treat React-Native 3.x as a new integration.
Make sure to comment out or delete old code related to React-Native 2.x and then proceed with the integration guide for 3.x
Updated 8 months ago