Replace your logo name, unit id. Customize background color, timeout if you want.
import UIKit
import AdropAds
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let windowScene = (scene as? UIWindowScene) else { return }
self.window = UIWindow(windowScene: windowScene)
// 스플래시 광고 요청 전에, Adrop instance를 초기화 해주세요.
// production 배포 시, 'true'를 사용하세요.
// 특정 국가에서 이 SDK를 사용하고 있다면,
// ISO 3166 alpha-2 국가 코드 array를 전달하세요.
// 타겟 링크가 열리는 브라우저 설정이 필요하다면, useInAppBrowser 값을 바꿔주세요.
Adrop.initialize(production: false, targetCountries: [], useInAppBrowser: false);
let splashViewController = AdropSplashAdViewController(unitId: "PUBLIC_TEST_UNIT_ID_SPLASH")
splashViewController.backgroundColor = splashViewController.traitCollection.userInterfaceStyle == .dark ? .black : .white
splashViewController.logoImage = UIImage(named: "splashLogo")
splashViewController.mainViewController = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()
splashViewController.delegate = self
self.window?.rootViewController = splashViewController
self.window?.makeKeyAndVisible()
}
...
}