Prerequisites

Step Summary

  1. Add the Initialization code for the SDK

  2. Register all the app UIViewControllers to the SDK

  3. Add the Tagged Wrappers, Tagged Buttons using the accessabilityLabel

  4. Note the Transitions

  5. Add the testing Single Data

  6. Test everything is working

  7. Change everything to production code

  8. Your app is now prepared for monetization with us.

Initialize the SDK

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()

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.

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

Tagged Wrappers

Tagged Wrappers