...
Add the Initialization code for the SDK
Register all the app
UIViewControllers
to the SDKAdd the Tagged tagged Wrappers, Tagged and tagged Buttons using the
accessabilityLabel
Note the Transitionstransition events
Add the testing Single Data
Test everything is working
Change everything to production code
Your app is now prepared for monetization with us.
...
Note |
---|
We require the SDK to be initialized only once and as early as possible, It can be done either inside your |
The first recommended place to initialize the SDK is the Initial UIViewController
on viewDidLoad()
UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)
method.
Code Block | ||
---|---|---|
| ||
import UIKit import R89SDK @main class InitialScreenViewControllerAppDelegate: UIViewControllerUIResponder, UIApplicationDelegate { override func viewDidLoad()application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { super.viewDidLoad() // 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() addTestingSingleTagData() /* This is a later step */ R89SDK.shared.initialize(publisherId: "TestRefinery89ID", publisherId: "TestPublisherID", appId: "TestConfigDemoAppTestAppId", singleLine: true, publisherInitializationEvents: nil) return true R89SDK.shared.registerLifecycle(uiViewController: self) } } }} |
Info |
---|
Your |
Note |
---|
This |
Register all UIViewController’s
Then on every UIViewController
viewDidLoad()
add the following lineUse R89SDK.shared.registerUIViewController()
method and register each UIViewController
instance in your app that represents a screen. This helps the R89SDK to track the user’s navigation and screen transitions in the app.
Code Block | ||
---|---|---|
| ||
import UIKit import R89SDK class ViewControllerMainViewController: UIViewController { ... override func viewDidLoad() { super.viewDidLoad() ... R89SDK.shared.registerLifecycleregisterUIViewController(uiViewController: self) } } ... } |
Tagged Wrappers
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
Tagged Wrappers
|
...