...
Add the initialization code.
Add the ad wrapper views in your app.
Follow our ad format guides for their implementation.
Test everything is working.
Change everything to production code.
Your app is now prepared for monetization with us.
We only mention how to create wrappers and not triggers because the way a trigger is fetch for its use is highly dependant on your specific app code.
Wrappers and Triggers/Events are used for different formats, each ad format page tells you what you need to use (wrapper or trigger) to display it.
Initialize the SDK
Note |
---|
We require the SDK to be initialized only once and as early as possible so for this purpose using the UIApplicationDelegate’s didFinishLaunchingWithOptions method or the first UIViewController’s viewDidLoad method is recomended. |
...
It can be done either inside your |
Initialization inside the UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)
delegate method.
Code Block | ||
---|---|---|
| ||
import UIKit import R89SDK @main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // This is for testing purposes, remove it on prod R89SDK.shared.setLogLevel(level: LogLevels.debug) // This is for testing purposes, remove it on prod R89SDK.shared.setDebug() // This is for testing purposes, remove it on prod // publisherId and appId are for testing purposes, remove it on prod R89SDK.shared.initialize( publisherId: "TestRefinery89ID", appId: "TestDemoApp", singleLine: false, publisherInitializationEvents: nil ) return true } } |
...
Note |
---|
This |
Add wrappers to your
...
views
Wrappers are the UIView
container inside which the ads will show. You need to add as many ad slots or ad places as you desire.
You can add the wrappers using XCode’s UI Builder or programmatically, for more see the iOS Creating a wrapper.
Follow our
...
ad format guides.
Child pages (Children Display) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...