This folder contains:
ObjectiveCSample: a sample integration using Objective-C,SwiftSample: a sample integration using Swift,Frameworks/Yieldprobe.xcframework: The Yieldprobe SDK.Frameworks/AditionAdsLib.framework: The Adition SDK.
The sample apps show a way to integrate the Yieldprobe SDK into the class ViewController.
- Select your Xcode project in the sidebar
- Select the project above the list of targets
- Select the tab “Swift Packages”
- Enter this value in the search bar
https://github.com/yieldlab/yieldprobe-sdk-ios.git - Click “Next”
- Select “Branch” → “master”
- Click “Next”
- In the list “Choose package product and targets:” make sure you add “Yieldprobe, Library” to your app target.
- Import Yieldprobe into your code:
import Yieldprobe - Start using the Yieldprobe API.
- Import the Yieldprobe SDK by adding
import Yieldprobe(Swift) or@import Yieldprobe;(Objective-C) to the beginning of your source file. - Use the shared instance to probe for a bid:
Yieldprobe.shared.probe(slot: <#yourAdSlotID#>) { result in
do {
let bid = try result.get()
let customTargeting = try bid.customTargeting()
<#forward custom targeting information to your ad server#>
} catch {
<#implement error handling code here.#>
}
}