Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

We require the SDK to be initialized only once and as early as possible,

The recommended place to initialize the SDK is the Initial UIViewController on viewDidLoad()

Code Block
languageswift
class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        R89SDK.shared.setLogLevel(level: LogLevels.debug)
        R89SDK.shared.setDebug()
        R89SDK.shared.initialize(publisherId: "TestRefinery89ID", 
                                appId: "TestConfigDemoApp", 
                                singleLine: true, 
                                publisherInitializationEvents: nil)
        
        R89SDK.shared.registerLifecycle(uiViewController: self)
    }
  }
}

Register all UIViewController’s

Then on every UIViewController viewDidLoad() add the following line.

Code Block
class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        R89SDK.shared.registerLifecycle(uiViewController: self)
    }
  }
}

Tagged Wrappers

Tagged wrapper is an iOS UIView with a requirement to have accessibilityLabel specified, either from the XCode UI builder or programmatically. This is used to find the views in the Single tag where you want us to add the monetization inventory.
You need to add as many as you can, remember that placing a tagged wrapper does not mean we need to use it.

Expand
titleDetails for Tagged Wrapper
Include Page
Tagged Wrappers
Tagged Wrappers