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: "button_tag")
}
...
}
|