Versions Compared

Key

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

...

Code Block
languageswift
import UIKit
import R89SDK

class MainViewController: UIViewController {
    
    @IBOutlet var topWrapperUIView:UIView!
    @IBOutlet var bottomWrapperUIView:UIView!
    ...
    override func viewDidLoad() {
        super.viewDidLoad()
        ...
        // Setting tags programmatically 
        topWrapperUIView.accessibilityLabel = "top_wrapper_tag"
        bottomWrapperUIView.accessibilityLabel = "bottom_wrapper_tag"
        // This line is necessary to inform R89SDK about app navigationUncommnet step below only if the UIViewController’s lifecycle events automatic tracking is disabled.
        // R89SDK.shared.registerUIViewControllertrackUIViewControllerLifecycleEvents(uiViewController: self)
    }
    ...
}

...

  • Do not overlap other wrappers on the app content, no matter the size it takes. if it is a space that you have a max Size to it, put it in the tag name.

  • Every blank space is a good space for a wrapper (even if you do not plan to use it).

  • Do not use only one tag for all of your wrappers, it will be hard to configure your monetization and change it according to your needs. So use as many different tags as possible (like id’s but you can have some of them repeated when it makes sense).

  • Use a blank (no subviews) UIView as the wrapper view.

Limitations

We can fill either all of the wrappers with a tag or just the first one we find with that tag: if you want to differentiate any wrappers you need to assign a different tag to those. E.g.: if you want us to fill a wrapper at the bottom of the screen that has the tag ads_wrapper we can fill that. However, if you have multiple wrappers with the same tag, and you want to fill all of them and exclude some while having the same tag, it’s not possible. We encourage you to ask for advice to our technical support on how to group wrappers

...

To enable tag lookup in the uiViewController’s view hierarchy and screen navigation tracking you will need to call R89SDK.shared.registerLifecycle(uiViewController: self) in the UIViewController.viewDidLoad() method to explicitly notify the R89SDK about screen load event. Keep in mind to call it AFTER tag configurations.

Code Block
languageswift
import UIKit
import R89SDK

class MainViewController: UIViewController {
    
    @IBOutlet var topWrapperUIView:UIView!
    @IBOutlet var bottomWrapperUIView:UIView!
    ...
    override func viewDidLoad() {
        super.viewDidLoad()
        ...
        // Setting tags programmatically 
        topWrapperUIView.accessibilityLabel = "top_wrapper_tag"
        bottomWrapperUIView.accessibilityLabel = "bottom_wrapper_tag"
        // This line is necessary to inform R89SDK about app navigation.
        R89SDK.shared.registerUIViewController(uiViewController: self)
    }
    ...
}

...

.