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.x | Status | Version 5.x |
---|---|---|
OBResponseRequest | Removed | Instead of OBResponseRequest there is now a Dictionary containing relevant info. |
OBViewabilityService | Removed | Please use OBViewabilityManager instead. |
SmartFeedManager | Removed | Please use SFWidget or Regular SDK implementation instead. |
OBLabel | Removed | The 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. |
OBVideoWidget | Removed | We no longer support standalone video widget. Please consult with your Outbrain contact in case you were using it. |
OBUtils | Removed | If you were using this class please consult with your Outbrain contact |
Outbrain.openAppInstallRec Outbrain.testAppInstall Outbrain.testBrandedCarousel | Removed | These 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.