/
iOS How to Test Single Tag Implementation
iOS How to Test Single Tag Implementation
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
R89SDK.shared.setDebug()
We also recommend adding
R89SDK.shared.setLogLevel(level: LogLevels.debug)
Full Example
R89SDK.shared.setDebug()
R89SDK.shared.setLogLevel(level: LogLevels.debug)
/* <SingleTagConfiguratorCode> */
addCustomSingleTagData()
R89SDK.shared.initialize(
publisherId: "TestPublisherID",
appId: "TestAppId",
singleLine: true,
publisherInitializationEvents: nil)
use SingleTagConfigBuilder
to add your single-tag data.
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: "play_video_trailer_tag")
}
...
}
, multiple selections available,
Related content
Android How to test Single Tag Implementation
Android How to test Single Tag Implementation
Read with this
Android Tagged Wrappers
Android Tagged Wrappers
Read with this
Android Single Tag Implementation
Android Single Tag Implementation
Read with this
iOS Banner
iOS Banner
Read with this
Android Get Started
Android Get Started
Read with this
iOS Get Started
iOS Get Started
Read with this