Step
...
summary
Enter Debug mode
Use
SingleTagConfigurator
to append custom data that would otherwise not exist neither either in the fake local data or in our prod apiAPI.Initialize normally the single tag implementation
1. Enter
...
debug mode
For testing single tag implementation add this before initialization
Code Block |
---|
R89SDK.shared.setDebug() |
We also recommend adding
Code Block |
---|
R89SDK.shared.setLogLevel(level: LogLevels.DEBUGdebug) |
Full Example
Code Block |
---|
R89SDK.shared.setDebug() R89SDK.shared.setLogLevel(level: LogLevels.DEBUGdebug) /* <SingleTagConfiguratorCode> */ addCustomSingleTagData() R89SDK.shared.initialize( appContext = this, publisherId =: "TestRefinery89IDTestPublisherID", appId: = "TestDemoAppTestAppId", singleLine =: true, initializationEvents = nullpublisherInitializationEvents: nil) |
use SingleTagConfigBuilder
to add your own single-tag data.
Code Block | ||||
---|---|---|---|---|
| fun addCustomSingleTagData()
{
//
| |||
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 ana 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 screenBuilder.addInterstitial(eventsToTrackTo: "NewsPostDetailScreenViewController", eventsToTrackButton: nil) /* trigger an interstitial when a button with this tag is pressed in "InitialScreenViewControllerj" (ScreenBuilder.screenName) */ screenbuilder screenBuilder.addInterstitial(eventsToTrackTo: nil, eventsToTrackButton: "buttonplay_video_trailer_tag") } ... } |