         return false
     }
 }
+
 
 extension AppDelegate: UNUserNotificationCenterDelegate {
 


@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    fileprivate let router = Router()

    var window: UIWindow?

    fileprivate lazy var manager: Manager<WindowLevel> = Manager(mainWindow: self.window!)

    private let disposeBag = DisposeBag()

    func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
        UNUserNotificationCenter.current().delegate = self
        return true
    }

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.

        print(CommandLine.arguments)
        print(NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0])

        setupWindow()

        ErrorHandlingSettings.launch()
        RoutingSettings.launch()

        setupiTunesMusic()
        setupPlayer()

        window?.backgroundColor = .clear
        window?.tintColor = .lightGray
        window?.makeKey()


        print((iTunesRealm()).configuration.fileURL?.absoluteString ?? "")
        print((iTunesRealm()).schema.objectSchema.map { $0.className })

        UNUserNotificationCenter.current().delegate = self
        UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .sound, .alert]) { granted, error in
            if granted {
                application.registerForRemoteNotifications()
            }
        }

        return true
    }

    private func setupWindow() {
        UIViewController.swizzle_setNeedsStatusBarAppearanceUpdate()
        manager[.background].rootViewController = PlaybackViewController()

        manager[.alert].rootViewController = MainStatusBarStyleViewController()
        manager[.background].backgroundColor = .hex(0x3b393a)
    }
    
    private func setupiTunesMusic() {
        let location = RealmLocation.group(appGroupIdentifier)
        if UserDefaults.standard.bool(forKey: "SettingsBundle::deleteRealm") {
