// // APPdelegateModularForData.m // jiaPei // // Created by 张嵘 on 2019/3/26. // Copyright © 2019 JCZ. All rights reserved. // #import "APPdelegateModularForData.h" #import "RQAppEventAnnotation.h" RQAppEventMod(APPdelegateModularForData) @implementation APPdelegateModularForData - (NSInteger)moduleLevel { return 1; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self initMudule]; // [self destroyModule]; return YES; } - (void)initMudule { //同步本地数据 [UserInfo shareInfo]; if (defUser.userDict) { myDelegate.isLogin = YES; // defUser.car_type = defUser.userDict[@"car_type"]; } //默认科目一 if (!myDelegate.subject) { myDelegate.subject = @"1"; } //异步获取新的广告 [jiaPeiManager requestADImage]; //判断跳转页面 这样每次更新版本 都会有导航页 NSString *vesionNow = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; if (![defUser.isWelcomed isEqualToString:vesionNow]) { [[NSUserDefaults standardUserDefaults] setBool:NO forKey:BOOLFORKEY]; defUser.isWelcomed = vesionNow; //如果更新了数据库 运行的时候要加上下面这句代码 提取旧库数据 移除旧的数据库 重新copy到document文件目录下 [DB_Que_Helper getDataFormLastDB]; myDelegate.isSyn = YES; } else { } } @end