SDK DocumentationRecipesAnnouncementsSupport Forum
AndroidiOSPluginsAnnouncementsSupport Forum
SDK Documentation

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.

  1. Update build.gradle to use the latest SDK 4 version (<<androidSDK4Version>>).

    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 4 integration - see:

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.

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

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

Migrating the React Native Plugin

🚧

For the React Native plugin, refer to the SDK 3 migration guide.