...
Code Block |
---|
|
import UIKit
import R89SDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// This is for testing purposes, remove it on prod
R89SDK.shared.setDebug() // This is for testing purposes, remove it on prod
// This is for testing purposes, remove it on prod
R89SDK.shared.setLogLevel(level: LogLevels.debug)
// publisherId and appId are for testing purposes, remove it on prod
R89SDK.shared.initialize(
publisherId: "TestRefinery89ID",
appId: "TestDemoApp",
singleLine: false,
publisherInitializationEvents: nil
)
return true
}
} |
2. Use debug config Ids
Implement the ad formats following their guide and using debug config IDs available in iOS - Ad Formats.
Example:
Code Block |
---|
|
import UIKit
import R89SDK
class ViewController: UIViewController {
...
@IBOutlet var adWrapper: UIView!
...
override func viewDidLoad() {
super.viewDidLoad()
...
let bannerConfigId = ConfigBuilder.companion.BANNER_TEST_R89_CONFIG_ID
RefineryAdFactory.shared.createBanner(
configurationID: bannerConfigId,
wrapper: adWrapper,
lifecycleCallbacks: nil)
}
...
} |