Skip to main content

Migration Guide

Migration 4.x to 5.x

Intro

Version 5.x of the Outbrain SDK is a major release which was re-written in Swift instead of Objective C. Majority of public APIs are intact, but there are some changes that will require publishers to update their code. This guide describes the public API changes and how to handle them from the publishers perspective.

caution

Please Note The minimum iOS version target has been increased to iOS 14.0

Public API changes

Here is a list of public API changes that were introduced in the Outbrain SDK version 5.x and replacements in case you used some of the classes:

Version 4.xStatusVersion 5.x
OBResponseRequestRemovedInstead of OBResponseRequest there is now a Dictionary containing relevant info.
OBViewabilityServiceRemovedPlease use OBViewabilityManager instead.
SmartFeedManagerRemovedPlease use SFWidget or Regular SDK implementation instead.
OBLabelRemovedThe OBLabel view was used to track Viewability in Regular SDK. This is now done internally so there is no need for this class any more. Please refer to Regular SDK implementation guide.
OBVideoWidgetRemovedWe no longer support standalone video widget. Please consult with your Outbrain contact in case you were using it.
OBUtilsRemovedIf you were using this class please consult with your Outbrain contact
Outbrain.openAppInstallRec Outbrain.testAppInstall Outbrain.testBrandedCarouselRemovedThese methods were part of the now deprecated SmartFeed feature so they were removed. Please remove any calls to these methods.

5.x additions

In the 5.x version among other changes we added a view modifier for Regular SDK visibility in SwiftUI tracking:

public func addViewability(with recommendation: OBRecommendation) -> some View

Please use it on the view that displays the OBRecommendation in order to track its viewability.