ARDAppDelegate.m (1663B)
1 /* 2 * Copyright 2013 The WebRTC Project Authors. All rights reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #import "ARDAppDelegate.h" 12 13 #import "sdk/objc/api/peerconnection/RTCSSLAdapter.h" 14 #import "sdk/objc/api/peerconnection/RTCTracing.h" 15 #import "sdk/objc/base/RTCLogging.h" 16 17 #import "ARDMainViewController.h" 18 19 @implementation ARDAppDelegate { 20 UIWindow *_window; 21 } 22 23 #pragma mark - UIApplicationDelegate methods 24 25 - (BOOL)application:(UIApplication *)application 26 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 27 RTCInitializeSSL(); 28 RTCSetupInternalTracer(); 29 _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 30 [_window makeKeyAndVisible]; 31 ARDMainViewController *viewController = [[ARDMainViewController alloc] init]; 32 33 UINavigationController *root = [[UINavigationController alloc] 34 initWithRootViewController:viewController]; 35 root.navigationBar.translucent = NO; 36 _window.rootViewController = root; 37 38 #if defined(NDEBUG) 39 // In debug builds the default level is LS_INFO and in non-debug builds it is 40 // disabled. Continue to log to console in non-debug builds, but only 41 // warnings and errors. 42 RTCSetMinDebugLogLevel(RTCLoggingSeverityWarning); 43 #endif 44 45 return YES; 46 } 47 48 - (void)applicationWillTerminate:(UIApplication *)application { 49 RTCShutdownInternalTracer(); 50 RTCCleanupSSL(); 51 } 52 53 @end