Migrating from SDK 2
Migrating from SDK 2 to SDK 4
Migrating SDK 2.x -> 4.x for Android
Treat SDK 4 as a new integration. It is not sufficient to update the
.gradle
file only.Placement codes used for v2 can be used with v4. No new codes are required.
-
Update
build.gradle
to use the latest SDK 4 version (<<androidSDK4Version>>
).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 4 integration - see:
- Android - Classic > Basic Integration
- Android - Web > Basic Integration
Migrating SDK 2.x -> 4.x for iOS
Treat SDK 4 as a new integration. It is not sufficient to update the
pod
file only.Placement codes used for v2 can be used with v4. No new codes are required.
Dependency managers
Instructions are provided below for CocoaPods.
However, SDK 4 supports other dependency managers too - e.g. Swift Package Manager (SPM).
For more detail, see the links provided below.
-
Edit your
pod
file to use the latest SDK 4 version (<<iosV4Version>>
).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 4 pods.
- Run
-
Implement the SDK 4 integration - see:
- iOS - Classic > Basic Integration
- iOS - Web > Basic Integration
Migrating the React Native Plugin
For the React Native plugin, refer to the SDK 3 migration guide.
Updated 8 days ago