Migrating from SDK 2 to SDK 3

Introduction

In order to streamline the integration, most of the methods and events from SDK 2 have been updated or replaced. As such, when migrating from SDK 2 to SDK 3, 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.

Migration guidelines for Android and iOS are provided below.

Migration Guidelines for Android

🚧

Treat SDK 3 as a new integration.
It is not sufficient to update the .gradle file only.

  1. Update build.gradle to use the latest SDK 3 version (<<androidSDKVersion>>).

    For detailed instructions, see:

  2. From within Android Studio, select: File > Sync Project With Gradle Files.

  3. Remove (or comment) out all Taboola SDK 2 code: init methods, setters, listeners, XML files, etc.

  4. From within Android Studio, select: Build > Clean Project.

  5. 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

  6. Implement the SDK 3 integration - see:

Migration Guidelines for iOS

🚧

Treat SDK 3 as a new integration.
It is not sufficient to update the pod file only.

  1. Edit your pod file to use the latest SDK 3 version (<<iosSDKVersion>>).

    For detailed instructions, see:

  2. Run pod install.

  3. Remove (or comment) out all Taboola SDK 2 code: init methods, setters, delegates, Storyboard elements, etc.

  4. From within Xcode, select: Product > Clean Build Folder.

  5. 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.
  6. Implement the SDK 3 integration - see:


Did this page help you?