Ads SDK Recommends Edition Integration Guide
The following steps outline the basic Recommends integration process and should result in the integrator being able to successfully test Recommends content loading in the application.
NOTE: Integration examples are provided in Kotlin and Swift. Examples can also be provided for Objective-C and Java if needed.
The Ads SDK is available for both Android and iOS platforms.
|Android Prerequisites||iOS Prerequisites|
|Android version 4.4 and up (API level 19+)||iOS 10+|
|Android Build Tools 29||Xcode 12.0+|
|Gradle-based build system||CocoaPods 1.8.4+|
|Build environment with Java 8|
You will need to work with your partner account manager to set up a Recommends account and module that can be used in your integration for launch. For more details please see the Recommends Module developer guide.
Configure Your Project
The Ads SDK is available via a maven repository (https://artifactory.verizonmedia.com/artifactory/maven/) on Android and CocoaPods on iOS. Add the SDK to your project by adding the following lines to your app’s build.gradle or Podfile:
[iOS Only] Enable SKAdNetwork
The Ads SDK supports attribution tracking via Apple’s SKAdNetwork framework. This allows Yahoo as well as participating third-party ad buyers to attribute app installs in the absence of the mobile device ID such as IDFA, which was removed due to the App Tracking Transparency introduced in iOS version 14.5.
Update your app’s Info.plist file and add a SKAdNetworkItems key with an additional dictionary that includes Yahoo’s SKAdnetwork ID, as well as our third-party buyers’ SKAdnetwork IDs. An up to date list of our 3rd party buyers is available here. In addition, you will also need to add your app’s App Store ID in VerizonAdsSourceAppId key. See example below.
It is recommended, but not required, that the ACCESS_FINE_LOCATION permission is also added to your AndroidManifest.xml so that the Recommends Edition can utilize the location data for targeting purposes to provide more relevant demand. See the sample app for examples on how to request permissions from users at runtime.
It is recommended, but not required, that location permissions are requested so that the Recommends Edition can utilize location data for targeting purposes to provide more relevant demand. See the link above and the sample app for examples on how to configure your Info.plist and then request permissions from users at runtime.
Initializing the SDK
Before the Recommends control can be utilized, the Ads SDK must be initialized and configured with a few important pieces of information. The initialization process requires a unique identifier for the publisher along with any privacy settings around COPPA, GDPR and CCPA compliance.
Further details around privacy compliance and settings can be found here.
If using ProGuard to minify your app, include the following in your ProGuard config file:
iOS Network Access
Add the following to the info.plist for the project to allow Recommends content to be loaded and displayed successfully.
Create a Recommends Control