Versions Compared

Key

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

...

  1. Add the Initialization code for the SDK

  2. Register all the app UIViewControllers to the SDK

  3. Add the Tagged tagged Wrappers, Tagged and tagged Buttons using the accessabilityLabel

  4. Note the Transitionstransition events

  5. Add the testing Single Data

  6. Test everything is working

  7. Change everything to production code

  8. Your app is now prepared for monetization with us.

...

Note

We require the SDK to be initialized only once and as early as possible, It can be done either inside your UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:) method or inside the first UIViewController.viewDidLoad() method.

The first recommended place to initialize the SDK is the Initial UIViewController on viewDidLoad() UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:) method.

Code Block
languageswift
import UIKit
import R89SDK

@main
class InitialScreenViewControllerAppDelegate: UIViewControllerUIResponder, UIApplicationDelegate {


   override func viewDidLoad()application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        super.viewDidLoad()
        // This is for testing purposes, remove it on prod
        R89SDK.shared.setLogLevel(level: LogLevels.debug)
        // This is for testing purposes, remove it on prod
        R89SDK.shared.setDebug()
  
  
           addTestingSingleTagData()  /* This is a later step */
        
        R89SDK.shared.initialize(publisherId:
"TestRefinery89ID",                    publisherId: "TestPublisherID",
             appId: "TestConfigDemoAppTestAppId", 
                  
             singleLine: true, 
         
                      publisherInitializationEvents: nil)
        return true
       R89SDK.shared.registerLifecycle(uiViewController: self)
    }

 }
}}
Info

Your publisherId and appId will be provided to you during onboarding process by email, you can also retrieve them from the web interface after login.

Note

This appID is not the same as the Manifest App Id you used in previous steps

Register all UIViewController’s

Then on every UIViewController viewDidLoad() add the following lineUse R89SDK.shared.registerUIViewController() method and register each UIViewController instance in your app that represents a screen. This helps the R89SDK to track the user’s navigation and screen transitions in the app.

Code Block
languageswift
import UIKit
import R89SDK

class ViewControllerMainViewController: UIViewController {
    ...
    override func viewDidLoad() {
        super.viewDidLoad()
        ...
        R89SDK.shared.registerLifecycleregisterUIViewController(uiViewController: self)
    }
  }  ...
}

Tagged Wrappers

Expand
titleDetails for Tagged Wrapper

Tagged Wrappers

Include Page
iOS - Tagged Wrappers
iOS - Tagged Wrappers

...