Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

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 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.

 Details for Tagged Wrapper
Unable to render {include} The included page could not be found.
  • No labels