...
Add The initialization code.
Create the Channel between web and native with
R89SDK.shared.configureWebView()
method.Use
R89SDK.shared.loadUrlWithConsentDataOrWait()
to load your urls URLs into the webviewweb view.Test everything is working.
Change everything to production codcode.
Your app is now prepared for monetization with us.
...
Note |
---|
We require the SDK to be initialized only once as early as possible so for this purpose using the UIApplicationDelegate’s didFinishLaunchingWithOptions method or the first UIViewController’s viewDidLoad method is recomended. |
Override the didFinishLaunchingWithOptions
delegate method inside your UIApplicationDelegate
class UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)
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", /* This is for testing purposes, change it on prod */ appId: "TestDemoApp", /* This is for testing purposes, change it on prod */ singleLine: false, publisherInitializationEvents: nil ) return true } } |
...