Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- import Appodeal
- @UIApplicationMain
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var appodealKey: String = "d072fa4967f7405bab0b9babfa332566e411f8a4e61b6fc2";
- var window: UIWindow?
- var isMainLayoutHide: Bool = false;
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
- return true
- }
- func applicationWillResignActive(_ application: UIApplication) {
- isMainLayoutHide=true;
- }
- func applicationDidEnterBackground(_ application: UIApplication) {
- isMainLayoutHide=true;
- }
- func applicationWillEnterForeground(_ application: UIApplication) {
- isMainLayoutHide=false;
- }
- func applicationDidBecomeActive(_ application: UIApplication) {
- let adTypes: AppodealAdType = [.interstitial, .banner, .nativeAd]
- Appodeal.setTestingEnabled(false);
- Appodeal.setBannerBackgroundVisible(true)
- Appodeal.setSmartBannersEnabled(true)
- Appodeal.setLogLevel(APDLogLevel.verbose);
- Appodeal.initialize(withApiKey: appodealKey, types: adTypes);
- isMainLayoutHide=false;
- }
- func applicationWillTerminate(_ application: UIApplication) {
- isMainLayoutHide=true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement