Introduction
Verify SDK Version
Add Outbrain to Plist
Open App Install Ad


Introduction

With the release of iOS 14 – Apple announced a new mechanism to validate “app install” ad installations on iOS device via SKAdNetwork:


“The ad network API helps advertisers measure the success of ad campaigns while maintaining user privacy”.


In order for the new SKAdNetwork validation to work, publisher app developers must configure their apps to work with ad networks as instructed below (by simply adding an entry to the app plist file. The full explanation is provided on this page on Apple website.





Verify SDK Version


Note: Please make sure your app integrate with Outbrain SDK version >= 4.0.0




Add Outbrain to Plist

From Configuring the Participating Apps


A source app is an app that participates in ad campaigns by displaying ads signed by an ad network. To participate in install validation, the source app must include the ad network’s ID in its Info.plist. Ad networks are responsible for publishing or providing their ad network identifiers to developers.


To include ad network IDs in your information property list:

1. Select Info.plist in the Project navigator in Xcode.

2. Click the Add button (+) beside a key in the property list editor and press Return.

3. Type the key name SKAdNetworkItems.

4. Choose Array from the pop-up menu in the Type column.


The following example shows an array with one dictionary that represent Outbrain ad network IDs 97r2b46745.skadnetwork.

<key>SKAdNetworkItems</key>
<array>
    <dict>
        <key>SKAdNetworkIdentifier</key>
        <string>97r2b46745.skadnetwork</string>
    </dict>
</array>


Verify Plist

When you complete to add the new SKAdNetworkItems entry to plist with Outbrain id, please run the app (with Outbrain SDK >= v4.0.0) and look at the Xcode log console for:

** Outbrain SKAdNetworkIdentifier is configured in plist ***




Open App Install Ad

Since “App Install” paid recs should be open via loadProduct() (method in StoreKit framework). Outbrain SDK will handle the call to loadProduct() for the app developer (with the required signature params). Therefore, app developers should handle a recommendation click as follows:


Objective-C

if ([recommendation isAppInstall]) {
    [Outbrain openAppInstallRec:recommendation inNavController:self.navigationController];
    return;
}

NSURL * url = [Outbrain getUrl:recommendation];
// Open url in SFSafariViewController


Swift

if rec.isAppInstall {
    print("rec tapped: \(rec.content) - is App Install");
    Outbrain.openAppInstallRec(rec, inNavController: self.navigationController!)
    return;
}

guard let url = Outbrain.getUrl(rec) else {
    print("Error: no url for rec.")
    return
}
let safariVC = SFSafariViewController(url: url)
self.navigationController?.present(safariVC, animated: true, completion: nil)