<commit_before>//
//  AppDelegate.swift
//  Percolator
//
//  Created by <NAME> on 2015-5-15.
//  Copyright (c) 2015年 <NAME>. All rights reserved.
//

import UIKit
import CoreData
import AlamofireImage
import SVProgressHUD

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    lazy var coreDataStack: CoreDataStack = {
        let options: [AnyHashable : Any] = [NSPersistentStoreUbiquitousContentNameKey : "Percolator",
                                            NSMigratePersistentStoresAutomaticallyOption : true,
                                            NSInferMappingModelAutomaticallyOption : true]
        return CoreDataStack(modelName: "Percolator", storeName: "Percolator", options: options)
    }()
    

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
        // Override point for customization after application launch.
        
        // Restore user info and update auth
        if let user = User() {
            BangumiRequest.shared.user = user
            user.updateAuth()
        } else {
            User.removeInfo()
        }

        // Set version info in Setting
        UserDefaults.standard.setValue(UIApplication.appVersion(), forKey: "Percolator.appVersion")
        UserDefaults.standard.setValue(UIApplication.appBuild(), forKey: "Percolator.appBundle")
        UserDefaults.standard.synchronize()
        
        // Set AlamofireImage cache
        UIImageView.af_sharedImageDownloader = ImageDownloader(
            configuration: ImageDownloader.defaultURLSessionConfiguration(),
            downloadPrioritization: .fifo,<commit_msg>chore: add EUMTouchPointView to AppDelegate<commit_after>//
//  AppDelegate.swift
//  Percolator
//
//  Created by <NAME> on 2015-5-15.
//  Copyright (c) 2015年 <NAME>. All rights reserved.
//

import UIKit
import CoreData
import AlamofireImage
import SVProgressHUD
import EUMTouchPointView

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
//    public var window: EUMShowTouchWindow? = EUMShowTouchWindow(frame: UIScreen.main.bounds)       // For App Preview
    lazy var coreDataStack: CoreDataStack = {
        let options: [AnyHashable : Any] = [NSPersistentStoreUbiquitousContentNameKey : "Percolator",
                                            NSMigratePersistentStoresAutomaticallyOption : true,
                                            NSInferMappingModelAutomaticallyOption : true]
        return CoreDataStack(modelName: "Percolator", storeName: "Percolator", options: options)
    }()
    

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
        // Override point for customization after application launch.
        
        // Restore user info and update auth
        if let user = User() {
            BangumiRequest.shared.user = user
            user.updateAuth()
        } else {
            User.removeInfo()
        }

        // Set version info in Setting
        UserDefaults.standard.setValue(UIApplication.appVersion(), forKey: "Percolator.appVersion")
        UserDefaults.standard.setValue(UIApplication.appBuild(), forKey: "Percolator.appBundle")
        UserDefaults.standard.synchronize()
        
        // Set AlamofireImage cache
        UIImageView.af_sharedImageDownloader = ImageDownloader(
            configuration: ImageDownloader.defaultURLSessionConfiguration(),
            downloadPrioritization: .fifo,
{'fraction_non_alphanumeric': 0.08207521273675542, 'fraction_numerical': 0.0060389788635739775, 'mean_word_length': 2.6586345381526106, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4924496', 'n_tokens_mistral': 973, 'n_tokens_neox': 938, 'n_words': 224}