Step
...
summary
Enter Debug mode
Use
SingleTagConfigurator
to append custom data that would otherwise not exist either in the fake local data or in our prod API.Initialize normally the single tag implementation
1. Enter
...
debug mode
For testing single tag implementation add this before initialization
...
use SingleTagConfigBuilder
to add your own single-tag data.
Code Block | ||
---|---|---|
| ||
import UIKit import R89SDK @main class AppDelegate: UIResponder, UIApplicationDelegate { ... func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ... addTestingSingleTagData() /* This is a later step */ R89SDK.shared.initialize(...) return true } func addTestingSingleTagData(){ // Add a Screen that is a UIViewController, the screenName you can get it by logging this in you code -> // in viewDidLoad you can use self.name -> // on InitialScreenViewController -> InitialScreenViewController // on NewsPostDetailScreenViewController -> NewsPostDetailScreenViewController let screenBuilder = SingleTagConfigBuilder.shared .addAdScreenBuilder(isFragment:false,screenName: "InitialScreenViewController") // Add a banner format to the wrapper with the tag main_activity_bottom_ad_container screenBuilder.addBanner(wrapperTag: "banner_tag", getAllWithTag: true, wrapperRelativePositionInside: true, wrapperRelativePositionAfter: false) /* trigger interstitial when we transition from "InitialScreenViewController" (ScreenBuilder.screenName) TO NewsPostDetailScreenViewController */ screenBuilder.addInterstitial(eventsToTrackTo: "NewsPostDetailScreenViewController", eventsToTrackButton: nil) /* trigger an interstitial when a button with this tag is pressed in "InitialScreenViewControllerj" (ScreenBuilder.screenName) */ screenBuilder.addInterstitial(eventsToTrackTo: nil, eventsToTrackButton: "buttonplay_video_trailer_tag") } ... } |