//
//  AppDelegate.m
//  fastservice
//
//  Created by xuning on 2/1/24.
//

#import "AppDelegate.h"
#import <AvoidCrash.h>
#import "XVLoginViewController.h"
#import "XVNaviViewController.h"
#import "XVMainJobViewController.h"
#import "XVNewOrderAlter.h"
#import "AppDelegate+ThirdParty.h"

@interface AppDelegate ()



@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    [AvoidCrash makeAllEffective];
    NSArray *noneSelClassStrings = @[
        @"NSString"
    ];
    [AvoidCrash setupNoneSelClassStringsArr:noneSelClassStrings];
    
    // 设置主窗口,并设置根控制器
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    if ([AppConfig needLogin]) {
        XVLoginViewController *loginVc = [[XVLoginViewController alloc]init];
        XVNaviViewController *navi = [[XVNaviViewController alloc]initWithRootViewController:loginVc];

        self.window.rootViewController = navi;
    }else{
        XVMainJobViewController *vc = [[XVMainJobViewController alloc]init];
        XVNaviViewController *navi = [[XVNaviViewController alloc]initWithRootViewController:vc];
        self.window.rootViewController = navi;
    }
    

    
    
    
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    
    [self thirdPartyConfig:application WithOption:launchOptions];
    

    
//    [XVNewOrderAlter show];
    
    return YES;
}




@end
