From a8297afeff989f07a0d54dadfec7b34799a9c5dd Mon Sep 17 00:00:00 2001 From: 单军华 Date: Wed, 11 Jul 2018 11:40:39 +0800 Subject: [PATCH] 打包配置 --- screendisplay/screendisplay/AppDelegate.m | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 176 insertions(+), 0 deletions(-) diff --git a/screendisplay/screendisplay/AppDelegate.m b/screendisplay/screendisplay/AppDelegate.m new file mode 100644 index 0000000..ca5cf1b --- /dev/null +++ b/screendisplay/screendisplay/AppDelegate.m @@ -0,0 +1,176 @@ +// +// AppDelegate.m +// screendisplay +// +// Created by ��������� on 2018/6/29. +// Copyright �� 2018��� ���������. All rights reserved. +// + +#import "AppDelegate.h" +#import "LMJTabBarController.h" +#import "LMJIntroductoryPagesHelper.h" +#import "AdvertiseHelper.h" +#import "YYFPSLabel.h" + +#import "LoginViewController.h" +#import "MonitoringMapViewController.h" +#import "DetailDataViewController.h" +#import "CommonReqModel.h" + +@interface AppDelegate () +{ + BMKMapManager* _mapManager; +} + +@end + +@implementation AppDelegate + ++ (AppDelegate *)AppInstance; +{ + return (AppDelegate *)[UIApplication sharedApplication].delegate; +} + +- (void)showHomePage +{ + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + self.window.backgroundColor = [UIColor clearColor]; + LMJTabBarController *root = [[LMJTabBarController alloc]init]; + UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:root];//������root���������navigation��� + nav.navigationBarHidden = YES; + [self.window setRootViewController:nav];//navigation������window��� + [self.window makeKeyAndVisible]; +} + +- (void)showLoginPage +{ + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + self.window.backgroundColor = [UIColor clearColor]; + LoginViewController *root = [[LoginViewController alloc]init]; + UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:root];//������root���������navigation��� + nav.navigationBarHidden = YES; + [self.window setRootViewController:nav];//navigation������window��� + [self.window makeKeyAndVisible]; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + + //self.window.rootViewController = [[LMJTabBarController alloc] init]; + + // ������������ + //[LMJIntroductoryPagesHelper showIntroductoryPageView:@[@"intro_0", @"intro_1", @"intro_2", @"intro_3"]]; + +// NSArray <NSString *> *imagesURLS = @[@"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4137683290,3868858004&fm=15&gp=0.jpg", @"https://������ss2.bdstati c.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4137683290,3868858004&fm=15&gp=0.jpg"]; +// +// // ������������ +// [AdvertiseHelper showAdvertiserView:imagesURLS]; +// +// // ��������� +// [self.window addSubview:[[YYFPSLabel alloc] initWithFrame:CGRectMake(20, 70, 0, 0)]]; + + // ������������������������������������BaiduMapManager + _mapManager = [[BMKMapManager alloc]init]; + /** + *������������SDK������������������������������������BD09������������������������GCJ02������������������������������������������������. + *���������BD09���BMK_COORDTYPE_BD09LL���������. + *������������������GCJ02���������������������CoordinateType������BMK_COORDTYPE_COMMON. + */ + if ([BMKMapManager setCoordinateTypeUsedInBaiduMapSDK:BMK_COORDTYPE_BD09LL]) { + NSLog(@"���������������������������"); + } else { + NSLog(@"���������������������������"); + } + BOOL ret = [_mapManager start:@"PGtisoyeerNjiDtFZou4oUhQurGiaaPN" generalDelegate:self]; + if (!ret) { + NSLog(@"manager start failed!"); + } + + [self showLoginPage]; + + //������������:NSException + //��������������������������������� + NSSetUncaughtExceptionHandler(&getException); + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + + +- (void)onGetNetworkState:(int)iError +{ + if (0 == iError) { + NSLog(@"������������"); + } + else{ + NSLog(@"onGetNetworkState %d",iError); + } + +} + +- (void)onGetPermissionState:(int)iError +{ + if (0 == iError) { + NSLog(@"������������"); + } + else { + NSLog(@"onGetPermissionState %d",iError); + } +} + + +//���������������C������ +void getException(NSException *exception) +{ + NSLog(@"���������%@",exception.name); + NSLog(@"���������%@",exception.reason); + NSLog(@"���������������%@",exception.userInfo); + NSLog(@"������������������%@",exception.callStackReturnAddresses); + NSLog(@"������������%@",exception.callStackSymbols); + //��������������������������������������������������������������������� + //������������������ + UIDevice*divice=[UIDevice currentDevice]; + //1.������������ + NSString*systemVersion=divice.systemVersion; + //2.app������������ + //���������������infoplist������������ + NSDictionary*infoDic=[[NSBundle mainBundle] infoDictionary]; + //��������������������������������� + NSString*version=[infoDic objectForKey:@"CFBundleShortVersionString"]; + NSLog(@"������������%@",version); + //3.������������ + NSDate*date=[NSDate date]; + //4.������������ + NSString*model=divice.model; + //������������������������������������������������������ + //��������������������������������������������������������� +} +@end -- Gitblit v1.8.0